How to migrate WooCommerce subscriptions between Stripe gateway plugins

Running two Stripe gateway plugins on the same WooCommerce subscription site can create renewal failures when saved payment tokens and subscription metadata are split between the two integrations. In one WooCommerce support case, existing subscriptions had been created through both Payment Plugins for Stripe WooCommerce and WooCommerce Stripe Gateway, which caused some automated renewals to fail when WooCommerce attempted to process a payment through a gateway that did not own the saved token.

The fix was not simply to deactivate one plugin. The remaining active and on-hold subscriptions first had to be migrated to the official WooCommerce Stripe Gateway, with customer and payment-method mappings preserved wherever possible. After testing the process on staging, the migration was repeated on production, the legacy gateway plugin was removed, and all active/on-hold Stripe subscriptions were verified to use the official gateway.

Issue background

The site used WooCommerce Subscriptions with two separate Stripe integrations:

  • Payment Plugins for Stripe WooCommerce
  • WooCommerce Stripe Gateway

Both plugins connected to the same Stripe account, but they stored and referenced payment methods differently.

This created a problem for recurring billing. Some subscriptions had been created using the older Payment Plugins gateway, while later renewal attempts were being processed through WooCommerce Stripe Gateway. WooCommerce could see that the saved payment method was not associated with the gateway attempting the renewal, so the automated charge was rejected.

The investigation also found recent Stripe errors indicating that some payment methods had previously been used without a valid Stripe Customer attachment or had later been detached from a Customer. That meant changing only the subscription’s gateway ID would not be enough in every case.

Diagnosis

The developer audited active subscriptions and stored payment tokens before making any production changes.

The site had hundreds of Stripe-related subscriptions and tokens across the two gateways. Most active subscriptions already used the official WooCommerce Stripe Gateway, but four active subscriptions were still assigned to legacy Payment Plugins gateway IDs.

Two of those subscriptions already had matching payment tokens available in WooCommerce Stripe Gateway and were relatively straightforward to migrate. Two others did not have a confirmed matching official Stripe token and required additional handling.

The audit also showed that many stored Payment Plugins tokens had matching official Stripe tokens, but some did not. That made a bulk plugin removal risky: deleting the old gateway before fixing the remaining subscription mappings could have left active renewals without a usable payment method.

The task also confirmed that High-Performance Order Storage (HPOS) was not enabled. That was documented as a separate future performance opportunity, not as part of the payment-gateway fix.

Resolution steps

The documented migration process was:

  1. Audit active and on-hold subscriptions. Identify every subscription still using legacy Stripe gateway IDs before removing anything.
  2. Audit stored payment tokens. Compare Payment Plugins tokens with the official WooCommerce Stripe Gateway tokens and identify where a matching Stripe customer/payment method already exists.
  3. Separate normal card failures from gateway-mapping failures. Errors such as insufficient funds or expired cards are different from attachment errors involving Stripe PaymentMethods and Customers.
  4. Create a staging environment. The developer reproduced and tested the migration on staging before modifying production subscriptions.
  5. Migrate remaining subscriptions to WooCommerce Stripe Gateway. All active and on-hold subscriptions still assigned to the legacy gateway were updated to use the official stripe gateway.
  6. Preserve existing Stripe customer mappings where possible. Existing Stripe Customer and PaymentMethod relationships were reused instead of forcing every customer to re-enter their card details.
  7. Generate missing official Stripe payment tokens when possible. Where the underlying Stripe data supported it, missing WooCommerce Stripe Gateway tokens were created so renewals could continue through the official integration.
  8. Do not rely on gateway metadata alone. If a Stripe PaymentMethod is detached or not correctly associated with a Stripe Customer, simply changing the subscription gateway will not repair it.
  9. Verify no active subscriptions remain on legacy gateway IDs. Before removing the old plugin, confirm that all active and on-hold Stripe subscriptions now point to the official gateway.
  10. Deactivate and remove Payment Plugins for Stripe WooCommerce. Once the migration was validated, the legacy gateway plugin was removed from production.
  11. Run post-migration smoke tests. The developer verified key site areas including the homepage and My Account after the plugin removal.
  12. Avoid triggering live renewals during migration. No live renewal payments were forced as part of the migration itself.

One subscription could not be fully repaired automatically because no valid Stripe customer/token mapping was available. That customer needed to log in and update their saved payment method before the next renewal.

Final outcome

The Stripe gateway migration was completed successfully on production.

WooCommerce Stripe Gateway became the only active Stripe gateway, and all active/on-hold Stripe subscriptions were moved to it. The legacy Payment Plugins for Stripe WooCommerce plugin was removed after validation.

Most subscriptions retained or received usable official Stripe payment tokens. One subscription still required manual customer action because no valid token mapping could be recovered automatically.

The broader lesson is that consolidating payment gateways on a WooCommerce Subscriptions site requires more than changing plugin settings. Subscription gateway IDs, stored tokens, Stripe Customer records, and PaymentMethod attachments all need to line up before the old integration can be removed safely.

If your WooCommerce subscription renewals are failing after a Stripe plugin change or you need to consolidate multiple Stripe gateways, contact Freshy. Our WordPress team can audit the subscription mappings, migrate payment tokens safely, and reduce the risk of breaking future renewals.