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:

ComponentMinimum VersionTested Up ToNotes
WordPress6.56.9Standard or Multisite installations
PHP7.48.4PHP 8.1+ recommended for optimal performance
WooCommerce9.011.2.1Requires core product, customer, and tax modules
WooCommerce Point of Sale6.27.3.0Webkul POS core plugin must be active
Web BrowserModern EvergreenLatest Chrome, Edge, Safari, FirefoxRequired 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:

  1. 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.
  2. 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 →