Inventory_Presser_Shortcode_Hours_Today::find_hours_sets_by_location_slug( string $slug )
find_hours_sets_by_location_slug
On This Page
Description Description
Get all sets of hours attached to a term in the location taxonomy
Parameters Parameters
- $slug
-
(string) (Required) The slug of a term in our location taxonomy
Return Return
(array) A set of hours
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 ); }
Expand full source codeCollapse full source codeView on Github