Bookings Use Case: Change Price of Booking Based on Duration of Stay

Offer a lower daily price when customers book for longer. This example uses one-day blocks and three pricing rules to discount bookings of two to eight days.

Scenario and requirements

↑ Back to top

A cabin rental offers these daily rates in US dollars:

  • 1 day: $30 per day.
  • 2–4 days: $27 per day.
  • 5–8 days: $24 per day.

The booking’s total duration determines the daily rate for every day booked. For example, a four-day booking costs 4 × $27 = $108.

Before you begin, activate WooCommerce and WooCommerce Bookings, and sign in with permission to edit products. This example uses a Bookable product with daily blocks. For overnight stays with check-in and check-out times, follow the Accommodation Bookings guide instead.

Set up duration-based prices

↑ Back to top
  1. Go to Products > Add new product, enter a name, and select Bookable product in Product data. To change an existing product, open it from Products > All Products.
  2. Select Virtual because this rental does not require shipping. Leave Has persons and Has resources unchecked for this example.
  3. In General, set Booking duration to Customer defined blocks of 1 Day(s). Set Minimum duration to 1 and Maximum duration to 8.
  4. Leave Enable Calendar Range Picker? unchecked so customers enter the number of days. For the calendar shown below, select Calendar always visible as the Calendar display mode.
  5. Open Costs. Set Base cost and Block cost to 0, and leave Display cost blank.
  6. Select Add Range three times. In each row, select Block count as the Range type. Leave the row’s Base cost at + 0 and select = for its Block cost operator. Enter these ranges and prices:
FromToBlock cost
11= 30
24= 27
58= 24
  1. Select Publish for a new product or Update for an existing product.

Check the customer price

↑ Back to top

Open the product on your store. Enter a duration and select an available future start date. For this setup, the booking cost should be $30 for one day, $54 for two days, $108 for four days, $120 for five days, and $192 for eight days. A duration above eight days should show a maximum-duration message.

If the price does not match

↑ Back to top
  • Confirm that every rule uses Block count, rather than Range of days, which matches days of the week.
  • Check that the ranges do not overlap and that each Block cost operator is =. All matching pricing rules apply, so review any additional rows.
  • Check that the product’s Base cost and Block cost are 0. Review any person or resource costs if you enabled those features.
  • If you cannot select a date, check Availability and choose dates with enough availability for the full duration.

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Power your membership association, online magazine, elearning sites, and more with access control to...

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.