For a happy hour, add three conditions to a pricing rule: Time from the start, Time to the end and Days of week in list the days. Example: 15% off pastries from 16:00 to 18:00, Monday to Friday.
How do I set up a happy hour?
- Go to WooCommerce > Pricepep > Product Pricing and click Add Rule.
- Set Method to Simple adjustment; under Adjustment choose Percentage discount and type
15. - Under Products, choose Product category in list Pastries.
- Under Conditions, add:
- Time, from, 16:00
- Time, to, 18:00
- Days of week, in list, Monday to Friday
- Description - Public: "Happy hour: 15% off pastries, weekdays 4-6 pm". Click Save Changes.
When does it apply?
All conditions must match, in your WordPress time zone (Settings > General):
| Moment | Discount |
|---|---|
| Wednesday 15:59 | No |
| Wednesday 16:00 | Yes |
| Wednesday 17:59 | Yes |
| Wednesday 18:00 | No |
| Saturday 16:30 | No |
A pastry at $4.00 costs $3.40 during happy hour. Prices are calculated when the cart is updated, so an item added at 17:55 and paid at 18:05 gets the normal price at checkout.
What else should I set?
- Shop prices: set Change display prices in shop to Change - Include simple adjustments so the shop shows the happy hour price. Pricepep's shop price cache follows Time and Days of week conditions.
- Page cache: a full-page cache may show happy hour prices after it ends. Use a short cache lifetime for those pages or exclude them; see caching.
- Countdown: the Countdown Timer counts down to the Time to end.
Variations
- Past midnight (22:00 to 02:00): rule 1 with Time from 22:00; rule 2 with Time to 02:00 (and the next day in Days of week if needed).
- Lunch deal in the cart: a cart discount with the same conditions.
- Monthly offer: Days of month (with a "last day" option) or Months.
- One-off sale: use Date or Date & time; see limited-time sale.
Frequently asked questions
Is the end time included?
No. Time to 18:00 means until 17:59:59. Time from 16:00 includes 16:00.
Can a happy hour run past midnight?
Not in one rule. Make two rules: one until midnight and one from midnight.