Skip to main content

Pricing Rules

Pricing rules on the appointable product Pricing tab adjust the booking total on top of the base product price, staff base costs, and add-ons.

Before you begin

How it works

Each rule has a Base cost column (once per appointment when the rule matches) and a Slot cost column (per interval segment when the segment is fully inside the rule window). All matching rules apply unless a developer filter limits that.

What you need

  • Appointable product with Custom pricing rules? enabled
  • Product interval understood — slot segments use interval for products saved after 5.0.0 (see below)

You are ready when

  1. ✅ At least one pricing rule is saved on the product Pricing tab
  2. ✅ Storefront total changes when you pick a slot inside the rule window

How pricing rules combine with base product and staff costs

Custom pricing rules

How totals are built

At checkout, WC_Appointments_Cost_Calculation computes:

Appointment cost = Base total + Sum of slot costs per segment

Add-ons are added after this via the add-ons integration (not inside the pricing-rule loop).

ComponentSourceApplied
Product priceProduct General tabOnce (in base total)
Staff base costStaff profileOnce per selected staff (in base total)
Rule base costMatching pricing rulesOnce per rule when the rule matches
Rule slot costMatching pricing rulesPer segment fully inside the rule window
Add-onsProduct add-onsAfter appointment cost is calculated

Segment counting (minute/hour products)

Product ageSegmentsSlot cost applies
Saved after 5.0.0 (default)ceil(duration ÷ interval)Each interval segment separately
Saved before 5.0.0 (legacy)Usually one segment per appointmentOnce per appointment (or per day for multi-day)

Example (modern product): 3-hour duration, 1-hour interval → 3 segments. A slot cost applies only to segments fully contained in the rule time window.

Base cost matching

Product ageWhen rule base cost applies
Saved after 5.0.0 (default)When any part of the segment overlaps the rule window
Saved before 5.0.0 (legacy)When the segment is fully inside the rule window (same as slot cost)

Each rule’s base cost applies at most once per appointment (first matching segment wins for that rule).

Slot picker prices

Per-slot prices on the calendar are a preview (WC_Appointment_Slots_Pricing). Checkout uses segment logic above and is authoritative. For single-interval bookings they usually match; long appointments can differ slightly on time rules.

Rule types (Pricing tab)

Match the admin Type dropdown:

TypeUI labelMatches
customDate rangeSpecific calendar dates
monthsRange of monthsMonths in range
weeksRange of weeksISO weeks in range
daysRange of daysWeekdays in range
timeRecurring time (all week)Clock time every day
time:rangeRecurring time (date range)Clock time on dates in span
time:1time:7MondaySundayClock time on that weekday
slotsDurationCustomer-selected duration in range
quantQuantity countBooking quantity in range
sessionsAppointments in package (5.4+, recurring only)Billable session count at recurring checkout

There is no staff pricing rule type — assign per-staff base cost on the staff profile, not on the Pricing tab.

Cost modifiers

Each Base cost and Slot cost cell has a modifier:

ModifierBase cost columnSlot cost column
+ (default)Add to running base totalAdd to segment slot cost
SubtractSubtract
×Multiply running base total(not in UI)
÷Divide running base total(not in UI)
=Set running base total to this valueSet segment slot cost to this value

= on base cost replaces the accumulated base total (product + staff + prior rule bases) — not add-ons.

Worked example

Product: $100 base · 3 h duration · 1 h interval (product saved after 5.0.0)

Staff: +$20 base cost

Rules:

RuleBaseSlot
Monday 14:00–16:00+$10+$5
Recurring time 09:00–12:00 (all week)+$15

Appointment: Monday 13:00–16:00 · add-ons $5

Three 1-hour segments: 13:00–14:00 · 14:00–15:00 · 15:00–16:00

LineCalculation
Product + staff$100 + $20 = $120
Rule base (Mon 14–16)+$10 once (13:00–14:00 segment overlaps 14:00)
Slot cost (Mon 14–16)+$5 × 2 (14:00–15:00 and 15:00–16:00 fully inside rule; 13:00–14:00 is not)
Peak 09–12 slot rule$0 (no segment fully inside 09:00–12:00)
Subtotal$140
Add-ons+$5
Total$145

Appointments in package (5.4+)

On a recurring-enabled product, Appointments in package adjusts the package subtotal at recurring checkout (after per-session costs are summed):

FieldPurpose
From / ToBillable session count range (e.g. 8–12 sessions)
Base cost + modifierApplied to package subtotal — slot cost column is ignored
  • First matching rule wins for the package total
  • (or empty modifier with a cost) multiplies the cost by billable session count per plugin logic
  • Per-session time/date rules may still apply before the package rule runs

See Recurring packages — Package pricing.