Skip to content

Commit

Permalink
Do not take into account days that open and close at the same time
Browse files Browse the repository at this point in the history
Hi,

Waiting for WC-Local-Pickup#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.
  • Loading branch information
smeric authored Nov 6, 2020
1 parent 86307e9 commit f5c4b49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/class-local-pickup-time.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f5c4b49

Please sign in to comment.