Closed faisal-alvi closed 4 months ago
The changed file was not indented correctly, due to which when one line changed in this PR, it started displaying that error. To fix that, I had to change indention of the whole file, that brought more PHPCS errors because the whole file was changed. I skipped further fixes in the current PR, assuming we can handle it in later PRs.
@faisal-alvi Thanks for the PR. I found some issues when removing Booking from the cart. Explined the issue with steps and product configuration setting in below screencast. Please have a look and let me know if need any help to reproduce.
@ankitguptaindia thanks for the report and detailed explanation through video. I feel those 2 issues you mentioned seem to be occurring due to the caching mechanism. Can you please try again by clearing the product-level cache? Happy to connect 1:1 to test this on call.
@faisal-alvi I re-checked this issue again and the issue is still happening after re-saving the product settings. Let's meet over a call if you are not able to reproduce issue.
Thansk @faisal-alvi I checked this by creating a new accommodation product and works fine now.
Testing Environment -
`
Test Results - The Issue has been fixed and working as expected now.
Functional Demo / Screencast -
Next Step- Ready to Code Review(Woo) UAT
Testing Documentation Status- Cases related to this PR/Issue, are added to Critical Flow Wiki Pages:
All Submissions:
Changes proposed in this Pull Request:
This PR addresses the availability issue that arises when a booking is made for more than 1 night. The problem was identified in the booking calendar of the bookings-availability extension, where only the first day of the booking was displayed as booked/unavailable, rather than showing all the days that were booked as unavailable.
To illustrate, if a booking was made for the 22nd to the 25th, the calendar previously only marked the 22nd as booked. However, with the fix, it now correctly displays the 22nd, 23rd, and 24th as booked. It's important to note that the 25th is not marked as booked because it is a checkout day, and a new booking is possible on that day.
In technical terms, the plugin previously marked only the days that "contained" the booking as booked (using
is_within_block()
), but the fix introduced a logic change. Now, it marks all the days that "intersect" with the booking as booked (usingis_intersecting_block()
).Closes https://github.com/woocommerce/woocommerce-bookings-availability/issues/554.
Steps to test the changes in this Pull Request:
Changelog entry