Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Disable Open Start/End Times to Match Store Open Days #87

Open
timnolte opened this issue Jun 10, 2020 · 1 comment
Open

Disable Open Start/End Times to Match Store Open Days #87

timnolte opened this issue Jun 10, 2020 · 1 comment

Comments

@timnolte
Copy link
Member

Is your feature request related to a problem? Please describe.
The store hours don't present a visible way to clear the hours for cases when the store isn't open on those days. You can highlight the hours/minutes and delete the with the keyboard but this isn't obvious.

Describe the solution you'd like
Add an obvious way to disable the day so it would be cleared, perhaps a checkbox that clears & disables the start/end time.

Describe alternatives you've considered
A clear button next to each time field that simply blanks it out.

Additional context
image

smeric added a commit to smeric/woocommerce-local-pickup-time that referenced this issue Nov 6, 2020
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.
@smeric
Copy link

smeric commented Nov 6, 2020

Waiting for this 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 ;)

Here /public/class-local-pickup-time.php#L566
You may simply replace :

if (
	! in_array( $pickup_datetime->format( 'm/d/Y' ), $dates_closed, true ) &&
	! empty( $pickup_day_open_time ) &&
	! empty( $pickup_day_close_time )
) {

with :

if (
	! in_array( $pickup_datetime->format( 'm/d/Y' ), $dates_closed, true ) &&
	! empty( $pickup_day_open_time ) &&
	! empty( $pickup_day_close_time ) &&
	$pickup_day_open_time !== $pickup_day_close_time
) {

Séb.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants