-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement/317-169 Ability to set product-level check-in/out times #328
Conversation
QA Report - Need Fixes ❌@faisal-alvi Changed time is working expected on other places except the Booking Edit page. Booking edit page still shows time which is coming from Plugin Global Setting. Order Edit Screen - Customer's email Checked ✅ Next Step- Moving back to re-fix. |
@ankitguptaindia, I have investigated the issue you reported and was able to reproduce it under the following conditions (and also fixed it):
Moving the linked issue tickets back to the QA column (Skipping 10up code re-review as the change looks fine). |
Hi @faisal-alvi Steps:
Issue.with.Check-in.Check-out.time.mp4Next Step- Moving back to re-fix. |
@ankitguptaindia thanks for the report. I tested again and the correct timings are displaying for me on product page, cart page, checkout page, order edit page, edit bookings page, my accounts > bookings page, etc. Let's connect 1:1 to discuss this in detail and test together on a call. |
@ankitguptaindia As per our discussion, on the order thank you page, the product ID returning to the filter is not an integer, making the condition
I've added a fix for it so it will always return the product ID as an integer. |
Thanks for debugging the issue and fix. It is working fine now. @faisal-alvi |
QA/Test Report- ✅Testing Environment -
Test Results -
Functional Demo / Screencast - https://screencast-o-matic.com/watch/c0fhIGVaxMI Next Step- Ready to Code Review(Woo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left some comments, but mostly optional stuff.
*/ | ||
public static function get_check_times( $type ) { | ||
$option = get_option( 'woocommerce_accommodation_bookings_times_settings' ); | ||
public static function get_check_times( $type, $product_id = 0 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might cause difficulties if a third party extends WC_Product_Accommodation_Booking
and overrides this method (since there will be a signature mismatch). Not sure how likely that is, but it may be worth calling out in release notes/changelog.
@dkotter just a note for when this is merged and released: #328 (comment)
Alternatively, we can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good 👍🏼
Regression+Smoke Test Report- ✅Testing Environment -
Tested with Archive File created via
Please note that this plugin is tested with the build created by specified versions of Composer, Node, and NPM.Status- Working as expected. Ready to merge 🚀 |
* Filter the check-in/out times for a specific product. | ||
* | ||
* @param string $check_time The check-in/out time stored in the database. | ||
* @param string $type The type, check_in or check_out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading this correctly, $type
has values of in
or out
, not check_in
or check_out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rtpHarry thanks for the report. We will fix it along with future fixes.
All Submissions:
Changes proposed in this Pull Request:
This PR introduces a new filter
woocommerce_accommodation_booking_get_check_times
that allows users to filter the check-in/out times per product.Closes #169,
Closes #317.
How to test the changes in this Pull Request:
functions.php
:Other information:
Changelog entry