diff --git a/src/Deprecated/Deprecated.php b/src/Deprecated/Deprecated.php index 9809c1b..b394212 100644 --- a/src/Deprecated/Deprecated.php +++ b/src/Deprecated/Deprecated.php @@ -245,31 +245,62 @@ public static function business_profile_render_services() { public static function business_profile_data_hours_of_operation() { $json_data = get_option('bpr_business_profile'); - $hours = $json_data['hours_of_operation']; - $hours_of_operation = ""; + $hours = $json_data['hours_of_operation'] ?? []; + + // Check if hours of operation exist if (empty($hours)) { - return ""; + return ""; } - return $hours_of_operation; - } - - public static function business_profile_render_hours_of_operation() { - $json_data = get_option('bpr_business_profile'); - $hours = $json_data['hours_of_operation']; - $hours_of_operation = "