Cartnorm Subscriptions is not on WordPress.org yet. These pages describe version 1.0.0, the version that will be published. Pro features are planned and marked as such.
A copy of your shop (a staging site, a local copy, a database moved to another server) contains the same subscriptions and the same scheduled renewals as the live shop. Without protection, it would charge your real customers a second time. Safe mode prevents that.
When safe mode turns on
Safe mode turns on automatically when any of these is true:
- the site address or the database table prefix differs from the one recorded on the live shop,
- the site ID file in the uploads folder is missing (the database was copied without the files) or belongs to another site,
- WordPress reports an environment type other than “production”, or the host name looks like a test or staging host,
- the constant
CARTNORM_SUBS_SAFE_MODEis set totrueinwp-config.php.
It is checked right before any money moves, so even renewals that were already queued in a copied database are not charged.
What happens in safe mode
Renewal orders are still created, but:
- nothing is charged,
- no customer emails are sent,
- saved cards are not removed from Stripe when they are deleted on this site.
An item in the admin bar (“Subscriptions: safe mode”) is shown on every admin page. A notice on the plugin’s screens and on the Plugins screen says that subscriptions are in safe mode and how many renewals are waiting; on the Plugins screen you can hide it until the reasons for safe mode change. WooCommerce › Subscriptions › Safe mode shows why safe mode is on.
Confirm the live shop
On the real shop, open WooCommerce › Subscriptions › Safe mode, type the domain of the site and click This is the live site. Only confirm on the real shop: on a copy, real customers would be charged twice. The confirmation is logged and emailed to the site admin.
If safe mode is forced by the constant, remove CARTNORM_SUBS_SAFE_MODE from wp-config.php instead. On a staging copy, you can add define( 'CARTNORM_SUBS_SAFE_MODE', true ); to its wp-config.php to keep it in safe mode for sure.
Renewals held by safe mode
Renewals that came due while safe mode was on are listed under Renewals held by safe mode. After leaving safe mode you decide what happens to them:
- Send the customers a pay link
- Charge the saved payment methods now
- Cancel these renewals (no charge)
The results are written to each subscription’s history.
Something unclear or missing? Write to [email protected].