Skip to content
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

Check-in/out times are always displayed in the product data tabs #314

Open
2 tasks
maxlaf opened this issue Oct 20, 2022 · 1 comment
Open
2 tasks

Check-in/out times are always displayed in the product data tabs #314

maxlaf opened this issue Oct 20, 2022 · 1 comment
Labels
priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue is a confirmed bug.

Comments

@maxlaf
Copy link
Member

maxlaf commented Oct 20, 2022

Affected ticket(s)

5647172-zen

What I expected

If the check-in/out time isn't set under Bookings > Settings > Accommodation, it shouldn't be displayed in the product data tabs.

What happened instead

If the check-in/out time isn't set by the user, it defaults to 14:00.

Steps to reproduce the issue

  1. Install Accommodation Bookings. Don't set the check-in/out times.
  2. Create an Accommdation booking product.
  3. View product. Check-in/out times are displayed

Additional Info

From my amateur glance, it looks like the Arrival/Departure tab shouldn't be displayed if the check-in/out times are empty:

But get_check_times returns 14:00 if it's not set:

return isset( $option['check_in'] ) ? $option['check_in'] : '14:00';

F7QIQs.png
2b673W.png


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).
@maxlaf maxlaf added the type: bug The issue is a confirmed bug. label Oct 20, 2022
@vikrampm1 vikrampm1 added the priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. label Oct 21, 2022
@faisal-alvi
Copy link
Member

faisal-alvi commented Oct 21, 2022

@maxlaf seems like the reason is that there must be check-in and out times set. Otherwise, customers may get confused about when they should arrive and/or when they have to leave. I think this is why the plugin sets 2 PM as a default in/out time. Removing the Arrival/Departure tab would mean that we also need to tweak the code and have to assume and set another in/out time (maybe 12 AM?) because, without it, we can not calculate the availability. But again that does not worth it because we again end up assuming/setting another default time, i.e. 12 AM.

Perhaps we should display 2 PM on the setting page instead of just "--:-- --", if store owner does not set any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants