eCommerce

WooCommerce Subscriptions: Renewals, Failed Payments, Pitfalls

Where WooCommerce Subscriptions goes wrong in practice: late renewals, gateway tokens, failed payments, staging copies that charge customers, proration surprises and risky migrations.

WooCommerce Subscriptions: Renewals, Failed Payments, Pitfalls

WooCommerce Subscriptions is dependable once it is set up well. Most of the trouble we are asked to fix comes from five places: the scheduler that triggers renewals, the gateway that holds the card, the handling of declined payments, copies of the site, and the settings for changing plans.

Each is covered below, with the screen to check and the mistake to avoid. If you are still choosing a payment gateway, read that section first, because it is the decision that is hardest to undo.

A quick map from symptom to cause

What you seeUsual causeWhere to look
Renewals run hours or days lateScheduled actions are not processed on timeWooCommerce > Status > Scheduled Actions
Every renewal waits for the customer to payThe gateway does not support automatic renewals, or the site is in staging modeThe notice at the top of the admin and the payment method on the subscription
A customer is charged twice for one periodTwo copies of the site processed the same renewalAny clone, old server or restored backup that is still running
Subscriptions sit on hold after a declined cardNo retry rules, and the customer never paid the failed orderWooCommerce > Settings > Subscriptions
An upgrade charges the full new priceProration is off for that kind of productThe Switching section of the same settings screen

WooCommerce Subscriptions renewals depend on a queue that has to run

Every subscription has a next payment date. When it arrives, a scheduled action with the hook woocommerce_scheduled_subscription_payment fires. Subscriptions creates a renewal order and, for automatic renewals, asks the gateway to charge the saved payment method. The renewal process documentation has each step.

The scheduler is Action Scheduler, which ships with WooCommerce, and by default it is driven by WP-Cron. WP-Cron only runs when WordPress handles a request. On a quiet store, or one where a page cache answers most visitors before WordPress loads, the queue falls behind and renewals go out late.

To check, open WooCommerce > Status > Scheduled Actions, filter by Pending and sort by scheduled date. Actions that were due in the past and are still pending mean the queue is behind. The fix is a real cron job. In wp-config.php:

define( 'DISABLE_WP_CRON', true );

Then, in the server's crontab or the host's cron tool:

*/5 * * * * cd /var/www/example.com && wp cron event run --due-now --quiet

Do both or neither. The constant on its own removes the regular trigger, and renewals then wait until something else runs the queue. A few older gateways, PayPal Standard among them, keep the billing schedule on their own side, so the store's queue is not what triggers those charges.

Lateness has a lasting effect. By default the next payment date is counted from when the last payment was taken, not from when it was due, so one renewal that runs two days late moves that customer's billing date for good.

The card lives at the gateway, your store holds a token

Your database never contains card numbers. The gateway stores the card and gives the store a token or customer reference, which is saved against the subscription. Three things follow.

Automatic renewals need a gateway extension that supports them. Any gateway can take manual renewals, where Subscriptions creates a pending order and emails the customer to pay. Only some can charge a saved method without the customer present.

Support is a list of features, not a yes or no. A gateway may or may not handle suspension, cancellation, reactivation, several subscriptions in one checkout, changes to the recurring amount, changes to the payment date, and payment method changes by the customer or by an admin. If you expect to raise prices for existing subscribers one day, the gateway has to support recurring amount changes. Compare your gateway against the gateway feature list before launch.

Tokens belong to one gateway account. Change the gateway, or the merchant account behind it, and the saved payment methods do not follow by default.

Decide what a failed payment does before one happens

By default, a declined renewal marks the order as failed and puts the subscription on hold. The customer gets an email with a link to pay, and nothing more happens until they do.

Subscriptions also has a retry system, switched on under WooCommerce > Settings > Subscriptions. With the default rules it tries the charge again several times over about a week and emails the customer on some attempts but not all. Between attempts the subscription stays on hold. After the last one the order is marked failed and the manual process takes over. The retry documentation lists the rules.

Before you rely on it, settle these points:

  • What "on hold" means for the customer. Does the membership or course plugin remove access the same hour? Does the next box still ship?
  • How long an on-hold subscription waits before someone cancels it, and who does that.
  • Whether customers can replace an expired card themselves from the account area. The gateway has to support payment method changes for this.
  • What happens when the bank asks for authentication. No retry gets that payment through. The customer has to come back and approve it, so the email that asks them to must be switched on.

The retention side of this is in our article on reducing churn from failed payments.

Staging copies and the double-charge problem

A copy of the live database contains live payment tokens. To stop a copy from billing real customers, Subscriptions stores the site address in the option wc_subscriptions_siteurl and compares it on each load. If the address has changed, it enters staging mode: automatic payments are disabled, renewals fall back to manual and subscription emails are not sent. An admin notice offers two buttons, one to dismiss the warning and one to enable automatic payments, as the staging site documentation shows.

Four rules follow:

  1. On a staging copy, never press the button that enables automatic payments.
  2. Staging mode silences subscription emails only. Other WooCommerce and plugin emails still go out, so route all staging mail to a catcher.
  3. A live site that moves to a new domain looks like a copy. Renewals quietly turn manual until someone confirms the new address is the live one.
  4. The address check cannot help when two copies share one address. An old server left running after a DNS change can process the same renewals as the live site. Before any server move, stop cron on the copy that must not bill, or take it offline.

Switching, proration and aligned billing dates

Upgrades and downgrades are off until you enable them in the Switching section of the Subscriptions settings. You then choose what the first payment after a switch does: charge the full new price, prorate on upgrades only, or prorate in both directions. Sign-up fees and fixed-term plans have their own options.

The surprises we see most:

  • Proration can be limited to virtual products. A subscription to a physical product may not prorate the way your pricing page suggests.
  • Only active subscriptions can switch. "Where is my upgrade button?" usually means the subscription is on hold after a failed payment.
  • Billing date alignment, which renews every subscriber on the same day, is set per product and applies to new subscribers only. You choose whether the first payment is the full amount, nothing until the aligned date, or a prorated amount.

Test each pair of plans with a test gateway, mid-cycle, in both directions, and compare the result with what your sales page promises.

Moving subscriptions to another site or gateway

A new gateway on the same site. The supported route is to stop offering the old gateway to new customers while leaving its extension active and connected. Existing subscriptions keep renewing through it, and customers move across when they change their payment method. Nothing moves them automatically. If the old account has to close, ask both processors about transferring card data between them. Afterwards each subscription needs its token replaced with the new reference, which is developer work.

A new site. Subscriptions, customers, products and the gateway references on each subscription all have to arrive with their IDs mapped. Rehearse the import on a copy that is in staging mode, and check that every next payment date is in the future before the scheduler runs. At cutover, exactly one site may be able to bill.

What to handle in-house and what to hand over

Reading the scheduled actions screen, setting up real cron with your host, choosing retry rules and testing switches are things a store team can do. Token migrations, site moves with active subscribers, renewal logic the settings do not cover and any investigation into a double charge are better given to someone who works in the Subscriptions data model every week. That is part of our WooCommerce development work, alongside WooCommerce customization for billing rules and the wider build of membership and subscription sites.

Frequently asked questions

Does WooCommerce Subscriptions store card numbers on my site?

No. The payment gateway stores the card and your site keeps a token that refers to it, which is why a copy of the database can still trigger real charges.

If I change a product's price, are existing subscribers charged the new amount?

No. Each subscription keeps the amount it was created with. To change it, edit the recurring amount on the subscription itself, which requires a gateway that supports recurring amount changes.

Does WooCommerce Subscriptions work with High-Performance Order Storage?

Current versions do, and subscriptions are stored alongside orders in the new tables. Custom code that reads subscription data with post meta functions needs the same audit as order code, which we describe in our explanation of WooCommerce HPOS.

Add WorldWin Coder to your preferred sources

Add worldwincoder.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.

Swati Priyadrshni
· Founder & CEO at WorldWin Coder

I'm Swati Priyadarshani, Founder & CEO of LMS Advisor and Co-Founder of WorldWin Coder Pvt. Ltd. (est. 2019). Over the last 10+ years, I've helped enterprises build learning platforms that actually get used - not just deployed.

Keep reading

Have something to build, fix or move?

Tell us where you are. A developer reads every inquiry, and you get next steps and a free quote within one business day.