What problem does it solve?
It fixes WooCommerce payment gateway implementations that mark payments incorrectly, leading to orders stuck in pending/on-hold, missing transaction IDs, broken cart clearing, or missing “order is paid” lifecycle events.
Core Features & Use Cases
- Correct gateway registration: Add a custom gateway class via the woocommerce_payment_gateways filter.
- Reliable payment handling flow: Use process_payment to return the proper {result, redirect} shape and call payment_complete with a transaction ID for successful synchronous captures.
- Refund + status state machine guidance: Implement process_refund when refunds are supported and avoid mixing payment_complete with update_status.
- Checkout Blocks readiness notes: Handle Store API payment requirements appropriately when capability support (via $supports) affects gateway availability.
Quick Start
Instruct the AI: “Review my WooCommerce gateway code and tell me exactly where to use payment_complete vs update_status, whether I’m returning the correct process_payment array shape, and why my cart isn’t empty after a successful charge.”