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/class-shortcode-hours-today.php

	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 Inventory_Presser_Taxonomies::get_hours( $location_term->term_id );
	}