Inventory_Presser_Shortcode_Hours_Today::find_hours_sets_by_location_slug( string $slug )

find_hours_sets_by_location_slug


Description

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


Parameters

$slug

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


Return

(array) A set of hours


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 );
	}