General background of my website
The website rent rooms based on hourly rental.
I use "WooCommerce Bookings And Appointments" plugin for my website.
The plugin URL is https://www.pluginhive.com/product/woocommerce-booking-and-appointments/
The plugin support Cost Rules and I control prices for all hours.
But I can’t find solution for specific scenario.
My goal is to add rule that:
If customer choose time between 10PM to 10AM.
And the minimum order hours as bigger then 6 hours.
Then the price will be for 6 hours.
Sample room price
Booking Period set in general setting with blocks of 30 minutes.
Booking costs setting:
Minimum price for 3 hours is 300$ (we use rules for block 1 to 6).
Base cost of room: 300$ (the customer can order less then 3 hours but the price will be at least for 3 hours).
Block cost: 50$ (start from block number 7).
Scenario for example:
if customer order 4 hours from 11PM to 3AM (total blocks: 8) the price will be regular: 400$ (Base cost: 300$ + 100$ [2 blocks of 50$ each])
if customer order 5 hours from 11PM to 4AM (total blocks: 10) the price will be regular: 500$
if customer order 6 hours from 11PM to 5AM (total blocks: 12) the price will be regular: 600$
If customer order 7 hours from 11PM to 6AM (total blocks: 14) the price will be 600$ instead 700$
If customer order 8 hours from 11PM to 7AM (total blocks: 16) the price will be 600$ instead 800$
If customer order 6 hours from 9PM to 3AM (total blocks: 12) the price will be 600$
If customer order 7 hours from 9PM to 4AM (total blocks: 14) the price will be 600$ instead 700$
- 9PM to 10PM = 100$
- 10PM to 4AM = 600$
If customer order 8 hours from 9PM to 5AM (total blocks: 16) the price will be 600$ instead 800$
- 9PM to 10PM = 100$
- 10PM to 5AM = 600$ (Rule trigger because the order bigger then 6 hours)
If customer order 14 hours from 9PM to 11AM (total blocks: 28) the price will be 800$ instead 1400$
- 9PM to 10PM = 100$
- 10PM to 10AM = 600$ (Rule trigger because the order bigger then 6 hours)
- 10AM to 11AM = 100$
I tried follow this post Set prices based on WooCommerce Bookings duration and make adjustments to my issue without success.
2
Answers
I created snippet and I don't see any change. Check this link to live preview
I miss something 🙂 Check this link to live preview