Timed flash sales in WooCommerce become more complex when the store already relies on ERP pricing, B2B visibility rules, and a theme that only supports date-based sale scheduling. In this case, the discovery work produced a practical architecture for a short promotional window using WooCommerce, WoodMart, B2BKing, and an ERP integration. The recommended approach was to keep the website responsible for timing, display logic, countdowns, and frontend behavior while using a separate custom flash-sale price field to avoid conflicts with normal pricing syncs.
Issue background
A WooCommerce store wanted to create a recurring flash-sale experience that would run during a narrow time window, such as a few hours on a Friday.
The desired behavior included:
- A countdown timer on both the main sale page and individual product pages
- Sale pricing that activates only during a precise date-and-time window
- Optional per-checkout purchase limits
- An optional cap on the total number of units sold at the flash-sale price
- Display of regular price, dealer price, and flash-sale price together
- A way to group sale products without permanently restructuring the catalog
- Compatibility with existing B2BKing visibility and pricing restrictions
- Protection against ERP price updates overwriting the temporary sale price
The WoodMart theme already included sale countdown functionality, but its built-in controls were based on sale dates rather than precise times within a day.
Diagnosis
The main architectural challenge was separating temporary promotional pricing from the store’s normal pricing workflow.
The site used an ERP integration to update product pricing and other product data. If the flash sale simply overwrote WooCommerce’s normal price fields, the ERP could replace those values during the promotion window.
A safer design was to create a dedicated flash-sale price field. The ERP could optionally map data into that custom field, while WooCommerce would continue to store and receive the normal product pricing separately.
The website would then decide which price to use based on the current date and time:
- Outside the sale window, WooCommerce would use the normal pricing structure.
- During the sale window, the custom flash-sale price would become the effective sellable price when a value was present.
This approach also allowed the frontend to continue displaying multiple price levels so B2B customers could see the difference between regular, dealer, and promotional pricing.
Several additional considerations were identified:
- Per-checkout quantity limits could be handled with custom WooCommerce validation.
- A global discounted-unit cap would require separate logic and careful handling of concurrent purchases.
- Tags could provide a low-maintenance way to curate the flash-sale landing page.
- Existing B2BKing restrictions would need to remain authoritative so users without permission to view a brand’s pricing could not see or purchase its flash-sale price either.
Resolution steps
- Create a dedicated flash-sale price field. Store promotional pricing separately from the standard WooCommerce regular and dealer price data.
- Make the field importable. Use product meta that can be populated through bulk import or mapped from an ERP when needed.
- Add precise sale start and end times. Extend the existing WoodMart or WooCommerce sale controls so each product can use both date and time rather than only a full-day sale date.
- Calculate the active sale state server-side. Determine whether the current request falls inside the configured sale window before applying the flash-sale price.
- Use the flash-sale price only when both conditions are met. The custom price field must contain a value, and the current time must fall inside the configured window.
- Preserve normal pricing outside the event. When the sale ends, the product should automatically revert to its standard pricing without requiring manual price restoration.
- Display all relevant price levels. Show regular price, dealer price, and flash-sale price in a clear hierarchy so customers can understand the savings.
- Add synchronized countdown timers. Use the same product-level sale timestamps on the landing page and product pages so both timers remain consistent.
- Use tags to build the sale page. Assign a temporary product tag through bulk import and query that tag on the flash-sale landing page.
- Remove products from the sale page after the event. Tags can be cleared after the promotion without changing the underlying category structure.
- Respect B2BKing restrictions. Apply the same brand and pricing visibility rules to the flash-sale price that already protect the normal catalog.
- Add per-checkout quantity validation if required. Limit how many units of a discounted item can be added to one order without creating long-term customer tracking.
- Treat global sale caps separately. If only a fixed number of discounted units can be sold across all customers, use inventory-safe logic that accounts for simultaneous checkouts.
- Avoid pausing ERP sync unless necessary. Keeping temporary pricing in a separate meta field reduces the need to suspend the normal product-data integration.
- Test sale transitions. Verify behavior before the start time, during the event, at the exact end time, and after the event has expired.
A simplified decision model might look like this:
if ( flash_sale_price_exists
&& current_time >= sale_start
&& current_time <= sale_end ) {
use_flash_sale_price();
} else {
use_normal_product_price();
}
The production implementation should use WooCommerce price filters and server-side timestamps rather than relying only on JavaScript countdowns. The countdown is a presentation layer; the server must remain the authority on whether the promotional price is actually valid.
Final outcome
The discovery phase produced a clear technical architecture for implementing timed WooCommerce flash sales without overwriting the store’s normal ERP-managed pricing.
The proposed approach used a custom flash-sale price field, precise product-level date and time controls, synchronized countdowns, tags for sale-page grouping, and the site’s existing B2BKing restrictions.
The task did not document a completed production build. It established the implementation path and the tradeoffs that would need to be addressed during development, especially around quantity limits, global sale caps, and ERP interaction.
The key lesson is that timed promotions should be designed as a separate pricing layer rather than as repeated edits to the store’s normal price fields. That keeps ERP synchronization, B2B visibility, and post-sale cleanup much easier to control.
For help planning WooCommerce flash sales, extending WoodMart sale functionality, or integrating promotional pricing with B2BKing and ERP workflows, contact Freshy.