What problem does it solve?
Fixes broken WooCommerce “My Account” saved payment method flows when templates or themes unintentionally change Woo/Stripe form structure, selectors, or hidden fields, causing users to fail to add cards.
Core Features & Use Cases
- Preserves Woo My Account contracts: keeps the required
form#add_payment_method, nonce field, hidden woocommerce_add_payment_method=1, radio/input naming, and gateway box structure so WC_Form_Handler can process the request.
- Correctly follows Stripe UPE or classic add-card flows: ensures the right mount containers and hidden intent/source fields are created and submitted (
wc-stripe-setup-intent for UPE, stripe_source for classic).
- Maintains compatibility with tokens and Subscriptions: avoids direct/partial token meta hacks and ensures the saved method appears in
/my-account/payment-methods/ and works with Subscriptions “change payment”.
Quick Start
Tell the AI: “I’m editing the WooCommerce My Account payment-methods templates for Stripe; identify what must stay canonical in payment-methods.php and form-add-payment-method.php, and then propose a safe way to apply my wrapper/classes without breaking add-card and SetupIntent submission.”