“电商与销售”领域的一个 Skill。已为 Claude Code, Codex, OpenCode 及另外 32 个智能体 准备好命令。
完整描述
Register a custom WooCommerce payment gateway — extend WC_Payment_Gateway, declare $id / $title / $supports, implement process_payment returning array(result, redirect), optionally process_refund when refunds is in supports, register via the woocommerce_payment_gateways filter. Canonical gotcha: payment_complete vs update_status — payment_complete runs the paid-order state machine (status, transaction id, session flag, payment-complete action), update_status only changes status. Includes the forgotten WC()->cart->empty_cart() call and Store API payment requirements for Checkout Blocks. Use when integrating/reviewing gateways or debugging "payment succeeded but cart didn't clear" / "order stuck in pending". Triggers on WC_Payment_Gateway, woocommerce_payment_gateways, process_payment, process_refund, payment_complete, get_return_url, woocommerce_payment_complete_order_status, woocommerce_store_api_register_payment_requirements.