For a non-technical method to test subscription renewal payments, please refer to the Process Renewal Action covered in the Store Manager Guide.
Once you have WooCommerce Subscriptions active on your site, you may want to test subscription renewal.
When using a payment gateway other than PayPal or WorldPay, you don’t have to wait 24 hours (the minimum billing period) for a renewal to be processed. However, if you are using PayPal or WorldPay, this process will not work and you must wait until the payment gateway processes the renewal (which can be anywhere from 24 to 48 hours after the purchase of a daily subscription in PayPal’s case).
If you have not already purchased a subscription to test, purchase a test subscription using the payment gateway you wish to test. After completing the purchase, take note of the order number for the subscription.
Now you have a test subscription and your site is in debug mode, you can trigger the renewal.
- Visit your site’s administration dashboard.
- Go to: WooCommerce > Status > Scheduled Actions.
- In the search box, enter subscription ID.
- Find the row with the hook ‘woocommerce_scheduled_subscription_payment’ and the status pending.
- Hover over the row and and click Run
In versions of Subscriptions prior to 2.1.3, once you have triggered the renewal successfully, if the subscription renewal processed correctly with an automatic renewal method, you will end up with two pending scheduled_subscription_payment actions.
You can find and trash either of these actions from the Scheduled Actions screen. Which scheduled action you choose to trash depends on which schedule you wish to keep.
Subscriptions appear to be active but display a renewal date in the past, it is likely due to a Cron issue. Follow these steps to troubleshoot the problem:
Verify that WP Cron is enabled. You can do this by accessing the status report in your WordPress admin area under WooCommerce > Status > Tools. If WP Cron is disabled, you will need to enable it.
After confirming cron is enabled try changing the next payment date ( if your payment gateway allows changes ) to one hour from now. This should trigger a new scheduled action to process a future renewal. If subscription renewals are not processing still, please consult the documentation titled “Complete Guide to Scheduled Events.” to troubleshoot WP Cron.