payment-method-add
Installation
SKILL.md
Add a Stripe Payment Method
Adding a payment method touches at least five places across PHP and frontend. The most common pitfall in this codebase is missing one of them — the method either doesn't appear on checkout at all, or appears on one surface but not another.
Required changes (in order)
1. PHP class
Create includes/payment-methods/class-wc-stripe-upe-payment-method-<id>.php extending WC_Stripe_UPE_Payment_Method.
Required overrides at minimum:
get_id()— return the Stripe payment method type (e.g.,klarna,affirm,sepa_debit).get_label()— translated method name shown to merchants in admin.get_icon()— return the icon URL registered in step 4.- Capability flags —
is_subscription_supported(),is_pre_order_supported(), currency/country constraints.
If the method supports recurring payments, also include WC_Stripe_Subscriptions_Trait and ensure subscription/pre-order initialization runs in the gateway constructor. Reference an existing recurring-capable method (Klarna, Card, SEPA) for the trait wiring pattern.