Inventory_Presser_Shortcode_Hours_Today::find_hours_sets_by_location_slug( string $slug )

find_hours_sets_by_location_slug

Description Description

Get all sets of hours attached to a term in the location taxonomy


Top ↑

Parameters Parameters

$slug

(string) (Required) The slug of a term in our location taxonomy


Top ↑

Return Return

(array) A set of hours


Top ↑

Source Source

File: includes/shortcode/class-shortcode-hours-today.php

	public function find_hours_sets_by_location_slug( $slug ) {
		if ( ! is_string( $slug ) ) {
			return null;
		}

		$location_term = get_term_by( 'slug', $slug, 'location' );
		if ( ! $location_term ) {
			return null;
		}
		return INVP::get_hours( $location_term->term_id );
	}