To trigger an off-schedule renewal and therefore trigger the renewal order email, please follow these steps:
- Purchase the test subscription with either Stripe or a gateway that requires manual renewal payments (e.g. Cheque, Bank transfer). PayPal won’t work.
- Find the subscription key for the newly purchased subscription.
- Delete the
wcs_blocker_{$user_id}_($subscription_key}
transient from the database (where$user_id
is the ID of the customer who purchased the subscription). - Install & activate the WP-Crontrol plugin
- Visit the Tools > Crontrol admin screen
- Find the WP-Cron job with the
scheduled_subscription_payment
hook and matching user ID & subscription key to the test subscription. - Click the Run Now link next to the appropriate WP-Cron job
And that should trigger the renewal early.
This may sound harder than it should be to simply trigger a renewal order email, but there are safeguards to ensure payments are not charged on an incorrect schedule, so to force payments to charge out-of-schedule, you have to remove those safeguards and then trigger the renewal.