Food & Beverage / E-commerce

Onirik — WooCommerce Delivery Scheduling Built Around Operations

A custom WooCommerce plugin that coordinates delivery zones, available dates, order capacity, cutoff times, same-day eligibility, pickup, and order records in one checkout workflow.

Context

Onirik Pastry Boutique needed checkout promises to reflect how orders are actually prepared and delivered across Cairo. Availability changes by delivery zone, weekday, order capacity, cutoff time, product eligibility, and blocked dates. Customers also need a separate pickup path from Heliopolis. The solution had to feel native to WooCommerce while giving store operators control over these rules without editing code.

The problem

Standard WooCommerce shipping rates can price a destination, but they do not model the complete scheduling decision. A date that appears available in the browser may become invalid because the cutoff has passed, the day is blocked, capacity is full, or one product in the cart is not eligible for same-day fulfillment. Delivery and pickup also have different timing and fee behavior. Whichever path the customer chooses must be validated on the server and preserved through administration, customer order views, and email notifications.

The approach

WooCommerce shipping zones remain the source of destination structure, while the plugin adds an operational rules layer for allowed weekdays, cutoff times, same-day service, daily capacity, blocked dates, and flat fees. Product and variation settings determine whether every item in the cart can use same-day delivery or pickup. The browser requests eligible dates through a nonce-protected AJAX endpoint, but checkout validation independently applies the same rules on the server. This keeps the interface responsive without trusting customer-submitted dates. Plugin settings are stored outside WordPress's autoloaded option set to reduce unnecessary memory pressure.

The solution

The plugin adds a clear delivery-or-pickup choice to checkout. Delivery customers select an enabled Cairo zone and then choose from dates that satisfy its calendar, cutoff, capacity, blocked-date, and cart-eligibility rules. The chosen zone sets the configured delivery fee. Pickup customers receive a dedicated Heliopolis message, pickup calendar, separate cutoff behavior, and no delivery charge. Store teams configure global and zone-specific rules from WooCommerce, set same-day eligibility per product or variation, and see the selected fulfillment method, zone, and date on orders. The same information flows into customer order details and transactional emails, with support for both legacy order storage and WooCommerce HPOS.

Important challenges

Keeping browser-side date choices and server-side checkout validation consistent across changing cart and zone conditions.. Calculating same-day availability only when the cutoff has not passed and every cart item is eligible.. Applying per-zone capacity and blocked dates without allowing an invalid or outdated date through checkout.. Switching between delivery fees and zero-fee pickup while preserving a clear customer experience.. Supporting WooCommerce's legacy order model and High-Performance Order Storage from the same plugin.

Verified outcomes

Created one checkout flow for zone-based delivery scheduling and Heliopolis pickup.. Made delivery availability configurable by weekday, cutoff, same-day eligibility, capacity, and blocked date.. Added server-side validation so unavailable dates cannot be accepted solely because they appeared in the browser.. Carried fulfillment details into store administration, customer order views, and transactional emails.. Verified PHP syntax, the installable archive, and plugin activation with WordPress and WooCommerce in an isolated local environment.

Book a Call