WordPress Developer Ukraine, Kyiv
PHP Fibers: Cooperative Concurrency for WordPress Background Tasks

PHP Fibers: Cooperative Concurrency for WordPress Background Tasks

PHP Fibers, parallel HTTP requests and background work in WordPress PHP 8.1 added Fibers, and articles promise “concurrency for WordPress” since then. A Fiber is a function that can pause itself and be resumed later; it does not run in parallel with anything. Without an event loop that does non-blocking I/O while fibers wait, they…
WP-Cron Deep Dive: Reliable Scheduled Tasks in WordPress

WP-Cron Deep Dive: Reliable Scheduled Tasks in WordPress

WP-Cron in depth: reliable scheduled tasks in WordPress WP-Cron is a pseudo-cron: there is no daemon. On page loads WordPress checks the list of scheduled events (the cron option), and if one is due, it sends a non-blocking request to wp-cron.php, which runs the events in the background. On a site with constant traffic this…
Hook into WooCommerce Order Status Transitions and Lifecycle Events

Hook into WooCommerce Order Status Transitions and Lifecycle Events

Hook into WooCommerce order status transitions A WooCommerce order moves through statuses: pending, processing, on-hold, completed, cancelled, refunded, failed, plus custom ones from extensions. Every status change fires a predictable set of hooks, so fulfillment, ERP sync, notifications and analytics can react to exactly the transition they need, without save_post and without polling.
Process Background Jobs in WordPress with Action Scheduler

Process Background Jobs in WordPress with Action Scheduler

Background jobs in WordPress with Action Scheduler WP-Cron is fine for “run this every hour”, but it is a poor queue: events are stored in one option, there is no history, and thousands of pending events slow every request. Action Scheduler, the library WooCommerce uses for its own background work, stores each job as a…