From f5c4b496eb8c64223b8d29cd3ba46bb0e1f0f40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20M=C3=A9ric?= Date: Fri, 6 Nov 2020 14:02:21 +0100 Subject: [PATCH] Do not take into account days that open and close at the same time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, Waiting for #87 to be addressed, I would suggest this small addition to disable days with same open and close time. Anyway it could be seen as something logical because if you open and close at the same time then you don't stay opened enough to allow any pick-up ;) And thanks very much for this plugin ! Séb. --- public/class-local-pickup-time.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/class-local-pickup-time.php b/public/class-local-pickup-time.php index e8fd23c..60d6ab4 100644 --- a/public/class-local-pickup-time.php +++ b/public/class-local-pickup-time.php @@ -563,7 +563,8 @@ public function get_pickup_time_options() { if ( ! in_array( $pickup_datetime->format( 'm/d/Y' ), $dates_closed, true ) && ! empty( $pickup_day_open_time ) && - ! empty( $pickup_day_close_time ) + ! empty( $pickup_day_close_time ) && + $pickup_day_open_time !== $pickup_day_close_time ) { // Get the intervals for the day and merge the results with the previous array of intervals.