What this prompt does
This prompt extends WooCommerce through hooks and filters to add a custom [product_type] with [custom_fields], a modified checkout via [checkout_modifications], custom order statuses [order_statuses] with email notifications, a [payment_gateway] integration, shipping based on [shipping_logic], cart changes from [cart_changes], My Account customizations, an order webhook to [webhook_target], admin order enhancements, and REST extensions for [api_extensions]. Critically, it uses WooCommerce hooks and filters only — no core file edits — and includes HPOS compatibility.
The structure works because WooCommerce is built to be extended, and editing core breaks on every update. The hooks-only constraint keeps the customization upgrade-safe. The [product_type] and [custom_fields] shape the product model, [order_statuses] drives the fulfillment workflow and its emails, and the webhook to [webhook_target] is what pushes orders cleanly into back-office systems on status change.
When to use it
- You need a custom
[product_type]like a subscription box with configurable fields - You're modifying the checkout flow with
[checkout_modifications]like date pickers or gift messages - You need custom
[order_statuses]with email notifications for a real fulfillment workflow - You're integrating a
[payment_gateway]such as Stripe with recurring billing - You want orders pushed to a
[webhook_target]like a fulfillment API on status change - You need HPOS-compatible code that survives WooCommerce updates
Example output
Expect hook-and-filter-based code: a registered custom product type with its fields, checkout modifications, registered order statuses with notification emails, gateway integration scaffolding, a shipping method, cart rule changes, My Account tweaks, a webhook handler firing on status change, admin order-screen enhancements, and REST API extensions for [api_extensions] — all HPOS-compatible and free of core file edits.
Pro tips
- Keep the no-core-edits rule sacred; the whole point of
[checkout_modifications]via hooks is surviving updates - Define
[custom_fields]precisely so the product type stores exactly what fulfillment needs - Test the
[payment_gateway]integration in sandbox first — recurring billing especially has edge cases the scaffold won't cover - Verify HPOS compatibility against your real order volume; the generated code targets it but you must confirm it under load
- Map
[order_statuses]to your actual fulfillment stages so the emails and webhook fire at meaningful transitions - Treat the
[webhook_target]handler as a starting point and add retries and idempotency before relying on it