WordPress Developer Ukraine, Kyiv
Build Custom WooCommerce Email Notifications from Scratch

Build Custom WooCommerce Email Notifications from Scratch

Build custom WooCommerce email notifications WooCommerce emails are built on the abstract WC_Email class. It renders the templates inside the standard WooCommerce header and footer, adds the settings page (enable, subject, heading, additional content, email type) under WooCommerce → Settings → Emails, replaces placeholders like {order_number}, and sends through wp_mail(). Every built-in email (new order,…
Custom Post Statuses for Editorial Workflows in WordPress

Custom Post Statuses for Editorial Workflows in WordPress

Custom post statuses for an editorial workflow in WordPress WordPress has one step between draft and published: “Pending Review”. A newsroom often needs more: an editor sends a text back for revision or marks it as approved, and somebody else schedules it. register_post_status() adds such statuses, but the function has a known gap: the block…
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…
WooCommerce Custom Order Status: Register, Style, and Trigger Email on Status Transition

WooCommerce Custom Order Status: Register, Style, and Trigger Email on S ...

A custom WooCommerce order status: “Ready for pickup” WooCommerce’s order statuses (pending, processing, on hold, completed, cancelled, refunded, failed) do not fit every shop. A store with local pickup needs a step between “processing” and “completed”: the order is packed and waiting at the counter. A custom status shows that in the order list, can…
WordPress wp_schedule_single_event(): One-Off Background Tasks with WP-Cron

WordPress wp_schedule_single_event(): One-Off Background Tasks with WP-C ...

One-off background tasks with wp_schedule_single_event() wp_schedule_event() creates tasks that repeat forever. Many tasks should run only once, at a certain time: a follow-up email a day after registration, a cleanup an hour after an import, a reminder before an event. wp_schedule_single_event() does that: it runs a hook once at the given time and removes the…
WordPress User Registration Hooks: Validate Custom Fields, Save Meta, and Send Welcome Email

WordPress User Registration Hooks: Validate Custom Fields, Save Meta, an ...

User registration hooks: validate extra fields, save them, send a welcome email The registration form on wp-login.php?action=register asks only for a username and an email. Three hooks let you extend it: register_form prints extra fields, the registration_errors filter validates them and can stop the registration, and user_register runs after the account was created. With profile_update…