Understanding How Priority Affects Availability Rules

In WooCommerce Bookings, the “Priority” setting lets you establish the order in which availability rules for your bookable products or services are applied. This ensures the correct rules are enforced when multiple availability rules exist.

The priority decides which rule takes precedence in case of conflicts. For example, if both a global availability rule for your store and specific rules at the product or resource level exist, the priority determines which rule will be applied. This page is a general reference guide to the availability rules and priority settings at the store, product, and resource levels.

Overview of Availability Rules and Priority Settings

↑ Back to top

Before we start, please note that, by default, the store availability rules (global availability) take precedence over the availability rules set at the product level, and the product availability rules take precedence over the resource-priority rules.

To make it simple, you can remember this as Store Availability Rules > Product Availability Rules > Resource Availability Rules.

A couple things to keep in mind about these rules and settings:

  • The priority numbers can be adjusted to modify this order. When determining availability, a lower priority number will always override a higher priority number, regardless of the context. For instance, even if a rule with a priority of 10 exists at the global level (store level), a rule with a priority of 9 at the product level will take precedence over it(This is illustrated in more detail in the example at the end of this page).
  • If multiple rows have the same priority number, the rules sorted higher on the list will take priority. You can adjust their order in the list by dragging them using the “handle” on the left side of the availability range interface.
  • Understanding the priority system allows you to fine-tune and control the availability of your resources and ensure that the desired rules are applied accurately based on their priority levels.

Let’s explore each of these levels and how they influence a booking’s availability:

Store Availability Rules

↑ Back to top

Store Availability Rules set the global availability restrictions for your entire WooCommerce store. They are applied to all bookable products unless overridden by more specific rules. These rules are configured in the Bookings > Settings > Store Availability and allow you to define general availability restrictions such as closed days, limited store hours, or other constraints that apply across your entire store.

Store Availability Rules act as the baseline availability restrictions that can be overridden at the product and resource levels.

Product Availability Rules

↑ Back to top

Product Availability Rules provide specific availability constraints for individual bookable products in your WooCommerce store. These rules allow you to define unique availability settings for each product, enabling you to tailor availability based on product-specific requirements.

By setting product-level availability rules, you can override the global store availability restrictions using the priority setting. For example, if your store isn’t open on Mondays, according to the store availability rules, you can still make a specific product available on Mondays. Do this by configuring the product availability rules and assigning a lower priority number than the one set at the store level.

Resource Availability Rules

↑ Back to top

Resource Availability Rules come into play when you have resources associated with your bookable products. Resources can represent staff members, rooms, equipment, or any other entity that contributes to the booking process.

Resource availability rules allow you to define the specific availability constraints for each resource. These rules further refine the availability settings for a particular bookable product and can override both the store and product-level availability rules.

Note: Events created in the connected Google calendar are pulled into the store’s Store Availability rules, where they will block the availability of all bookable products for the duration of the events. These events created within Google Calendar are synched to the Store Availability with a priority of 10.

Use Case – Setting priority at store, product, and resource levels

↑ Back to top

Now that you have an understanding of how each level of availability rules and priority settings work, let’s take a look at an example of how you can set priority rules at all three levels. We’ll use the Hair Salon template built into WooCommerce Bookings to quickly illustrate how to set priority for each level.

In the template, the Hair Salon bookable product’s availability is set from 9:00am-8:00pm (9:00-20:00) Monday through Friday and from 8:00am-4:00pm (8:00-16:00) Saturdays and Sundays. There are four hairstylists: Joel, Steve, Shane, and Laurena.

Let’s say we want to make the following changes to the salon’s availability:

  • Add a lunch break for all hairstylists between 12:00pm-1:00pm (12:00-13:00) every day.
  • Laurena should not have any availability on Fridays as it is her day off.
  • Close the store on September 15th.

Here’s how we’ll configure this scenario using availability rules and priority settings:

Adding the hairstylists’ lunch break (Product level):

In this scenario, we only want the hairstylists’ lunch break to impact the hair salon bookable product, since nail techs or other employees have a different lunch schedule and the store is still open, we just don’t accept appoints for haircuts and styles during this time. We’ll set the availability rules and priority settings at the product level by following these steps:

  1. Navigate to the “Availability” tab in the bookable product’s edit screen.
  2. Click the “Add Range” button at the bottom of that screen.
  3. Select “Time Range(all week)” for the Range type.
  4. Set the range by entering 12:00pm in the first box, and 01:00pm in the second box.
  5. Select “No” under the Bookable column.
  6. Set the priority to 9 (so that it is overrides the general store availability).
  7. Click “Update” in the top right of the product’s edit screen to save the settings.

Adding Laurena’s day off (Resource level):

Laurena’s day off will only need to override both the store and product availability settings since she’s entirely unavailable on Fridays. We’ll set the availability rules and priority settings at the resource level by following these steps:

  1. Navigate to “Resources” from Bookings > Resources or from the bookable product’s Resources tab.
  2. Click “edit” or “edit resource” next to Laurena’s name.
  3. Click the “Add Range” button at the bottom of that screen.
  4. Select “Friday” as the Range type.
  5. Set the range by entering 09:00am in the first box and 08:00pm in the second box.
  6. Select “No” under the Bookable column.
  7. Set the priority to 9 (to override the availability settings at the store and product levels).
  8. Click “Update” in the top right to save the settings.

Closing the Store on September 15th (Store level):

On September 15th, the store will close for a mandatory training for all employees. We’ll need to override the store’s availability settings to ensure customers can’t book appointments. We’ll set the availability rules and priority settings at the store level by following these steps:

  1. Navigate to Bookings > Settings > Store Availability (this is the first tab in Settings).
  2. Click the “Add Range” button at the bottom of that screen.
  3. Select “Date Range” as the Range type.
  4. Select September 15th for both the first and second box (this limits the closing to just one day).
  5. Select “No” under the Bookable column.
  6. (Optional) Add a title to the range.
  7. Drag and drop the date range to the top of the store availability rules list using the handle on the left ( ≡ ). We don’t need to set a priority number in this case since we only need to override the other store availability rules, we just need to make sure it’s at the top of the list.
  8. Click “Save Changes” at the bottom of the screen.

After completing the steps above, the calendar for the salon product should reflect the hairstylists’ lunch break, Laurena’s day off, and the store closure on September 15th.

Here’s how it looks:

  1. When Laurena is selected as the stylist, Fridays are not available.
  2. There are no available appointments for 12:00pm, which is the stylists’ lunch break.
  3. There is no availability on September 15th, since the store is closed.

Questions and Support

↑ Back to top

Something missing from this documentation? Do you still have questions and need assistance?

  • Have a question about a specific extension or theme you’d like to purchase? Click here.
  • Already purchased and need some assistance? Get in touch with a Happiness Engineer via the WooCommerce.com Support page and choose this extension name from the “I need help with” dropdown.

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.