woocommerce / woocommerce-accommodation-bookings

An accommodations add-on for the WooCommerce Bookings extension.
87 stars 31 forks source link

Unavailable accommodation days appear as available when the "Display visitor's local time" setting is enabled. #417

Closed ankitguptaindia closed 2 days ago

ankitguptaindia commented 4 months ago

Description: Unavailable days appear as available when the "Display visitor's local time" setting is enabled in Bookimg Timezone setting.

Screenshot 2024-03-08 at 3 24 48 PM

https://github.com/woocommerce/woocommerce-accommodation-bookings/assets/6384299/7a474ff5-3de6-4837-89ae-1bd55dc7279a

Screenshot ![Screenshot 2024-03-08 at 3 24 28 PM](https://github.com/woocommerce/woocommerce-accommodation-bookings/assets/6384299/7f9eb31f-53cd-4b31-acd5-67e50f6aaf24)

Steps to Reproduce:

  1. Create an accommodation product for day booking.
  2. Set "Number of rooms available" to 1 in availability settings.
  3. Navigate to Booking > Setting > TimeZone and check "Display visitor's local time".
  4. Book a room for a day, for example, the 25th of the month.
  5. After successful booking, return to the calendar and note that the 25th appears as green/available.
  6. Click on the 25th and note the error message "There are a maximum of 0 places remaining on 25/03/2024".
  7. Navigate to Booking > Setting > TimeZone and uncheck "Display visitor's local time", and check "Display your local time from WordPress settings".
  8. Open the calendar again and note that all booked days will appear as unavailable.

Expected Result:

Unavailable days should appear as unavailable regardless of the "Display visitor's local time" setting.

Actual Result:

Unavailable days incorrectly appear as available when the "Display visitor's local time" setting is enabled, leading to potential confusion.