Overview & System Requirements
WooCommerce POS Happy Hours Discount bridges promotional marketing and retail operations. The extension operates as a specialized add-on for the Webkul WooCommerce Point of Sale System, extending both the administrative back-office and the cashiers' single-page POS application.
System Requirements
Ensure your server and WordPress environment meet the verified system requirements below before installation:
| Component | Minimum Version | Tested Up To | Notes |
|---|---|---|---|
| WordPress | 6.5 | 6.9 | Standard or Multisite installations |
| PHP | 7.4 | 8.4 | PHP 8.1+ recommended for optimal performance |
| WooCommerce | 9.0 | 11.2.1 | Requires core product, customer, and tax modules |
| WooCommerce Point of Sale | 6.2 | 7.3.0 | Webkul POS core plugin must be active |
| Web Browser | Modern Evergreen | Latest Chrome, Edge, Safari, Firefox | Required for running the POS cashier SPA |
Modern WooCommerce Compatibility
The plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS), utilizing native order tables for rapid order placement and database query optimization.
Architectural Overview
The plugin operates across two primary runtime tiers:
Back-Office Management (WordPress Admin):
- Registers configuration tabs within Point of Sale → Settings → Happy Hours.
- Adds a dedicated management screen under Point of Sale → Happy Hours.
- Maintains campaign schedules, eligible customer lists, and discount tiers in the custom database table
{$wpdb->prefix}wkposhhd_happy_hours.
Cashier Application (Point of Sale SPA):
- Built on modern React and Redux state management.
- Listens to core POS lifecycle hooks (
wkwcpos_perform_action_on_home_component_load,wkwcpos_change_in_cart_total_filter,wkwcpos_add_custom_header_data_at_right). - Fetches active Happy Hour configurations via asynchronous endpoints and updates the local POS memory store.
- Calculates real-time discounts, adjusts line-item totals and taxes, and passes promotional metadata to completed order receipts.
flowchart TD
A["Admin sets Rule in wp-admin"] --> B["Rule stored in wkposhhd_happy_hours"]
B --> C["POS Cashier logs into Terminal"]
C --> D{"Is current time within Happy Hours?"}
D -- "No" --> E["Standard POS Pricing Applies"]
D -- "Yes" --> F["Header Countdown Timer Displays"]
F --> G["Cashier adds product to Cart"]
G --> H{"Discount Evaluation"}
H -- "Product Rule Exists" --> I["Apply Product Discount"]
H -- "Category Rule Exists" --> J["Apply Category Discount"]
H -- "Cart Total in Range" --> K["Apply Cart Total Discount"]
I --> L["Update Cart, Total & Invoice"]
J --> L
K --> L
L --> M["Print POS Receipt with Happy Hour deduction"]
Supported Product Types & Workflows
- Simple Products: Instant fixed price deduction or percentage deduction.
- Variable Products: Discounts calculate dynamically based on the selected variation price, automatically recalculating taxes proportionally.
- Customer Restrictions: Supports open promotions for all shoppers or exclusive campaigns for selected registered users.
- Offline / Sync Handling: When the terminal is refreshed or an order is completed, the discount states re-synchronize seamlessly with the server.
Next step: Installation & Setup →
