{"id":"ce16c42f-2c9e-4efe-8be0-d6b9b36a7c2a","task":"Implement a WooCommerce custom order status and email notification for a multi-step manufacturing fulfillment workflow","domain":"WooCommerce custom order status and email","steps":["Register custom order statuses in WooCommerce by hooking into the woocommerce_register_shop_order_statuses filter and adding the custom status slugs prefixed with wc- along with their display labels","Add the custom statuses to the valid order statuses list using the wc_order_statuses filter so WooCommerce recognizes them for status transition and display","Create a custom WooCommerce email class by extending WC_Email, setting the trigger to fire on the woocommerce_order_status_{custom_status} action hook, and registering it via the woocommerce_email_classes filter","Design the custom email template in both HTML and plain text formats following WooCommerce's email template directory structure for overridability in themes","Restrict the allowed status transitions to enforce the manufacturing workflow sequence by filtering the admin dropdown via woocommerce_admin_order_actions or by adding transition validation in the order save hook","Expose the custom order statuses to the WooCommerce REST API by hooking into the woocommerce_valid_order_statuses_for_payment_complete filter so external integrations can update orders to the custom status via API"],"gotchas":["WooCommerce custom order status slugs must be prefixed with wc- in the internal registration but are referenced without the prefix in hooks and API status parameters; inconsistency between the two causes status transitions to fail silently","Custom WooCommerce email classes must be registered before WooCommerce initializes its email handler; hooking registration later than woocommerce_email_classes results in the email being excluded from the send queue","With HPOS enabled, status transition hooks behave differently than with the posts table; test all custom status hooks in an HPOS-enabled environment to verify they fire correctly on the orders custom table"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/ce16c42f-2c9e-4efe-8be0-d6b9b36a7c2a"}