wc-stripe-add-payment-method

Preserves WooCommerce Stripe add-payment-method form structure for reliable card submission.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vikingokft/wp-agent-skills --skill wc-stripe-add-payment-method
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wc-stripe-add-payment-method
Source: https://github.com/vikingokft/wp-agent-skills/tree/main/woocommerce/wc-stripe-add-payment-method
Command: npx skills add https://github.com/vikingokft/wp-agent-skills --skill wc-stripe-add-payment-method

SYSTEM DOCUMENTATION & REQUIREMENTS

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.”

Frequently Asked Questions about wc-stripe-add-payment-method

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does WooCommerce Stripe fail to add a saved payment method in My Account?▼

WooCommerce Stripe fails to add a payment method when theme template overrides break the canonical form structure, removing required hidden fields like the nonce and setup intent inputs needed for processing. Preserving the exact form IDs and hidden inputs ensures the request succeeds.

How do I override WooCommerce My Account payment method templates without breaking Stripe?▼

To override WooCommerce My Account templates safely, you must retain the exact form#add_payment_method ID, input names, nonce field, and the hidden woocommerce_add_payment_method=1 value so WC_Form_Handler can correctly process the Stripe submission.

Does WooCommerce Subscriptions require specific Stripe setup intent handling?▼

WooCommerce Subscriptions requires correct Stripe setup intent handling to avoid direct token meta hacks. Properly wiring the wc-stripe-setup-intent field for UPE or stripe_source for classic Elements ensures the saved method works for change payment flows.

What hidden fields are required for the WooCommerce Stripe add card form?▼

The WooCommerce Stripe add card form requires the nonce field, the hidden woocommerce_add_payment_method=1 input, and the correct setup intent or source mount containers to successfully tokenize and save the payment method data.

Can I customize the My Account payment methods UI with Stripe UPE enabled?▼

You can customize the My Account payment methods UI with Stripe UPE enabled, provided you maintain the exact gateway box structure and ensure the correct UPE mount containers and hidden intent fields are created and submitted without alteration.

Best way to fix WooCommerce Stripe saved cards not showing in My Account?▼

The best way to fix WooCommerce Stripe saved cards not showing in My Account is to ensure your custom templates preserve the required form contracts and avoid partial token meta hacks, allowing the saved method to appear in payment-methods.php correctly.