1. Documentation /
  2. Testing Subscription Renewal Payments

Testing Subscription Renewal Payments

This is a technical guide to testing subscription renewal payments. It is written for WooCommerce developers to help them understand how to use the underlying scheduling system in WooCommerce Subscriptions.

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).

Purchase a Test Subscription

↑ Back to top

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.

Trigger the Renewal

↑ Back to top

Now you have a test subscription and your site is in debug mode, you can trigger the renewal.

  1. Visit your site’s administration dashboard.
  2. Go to: WooCommerce > Status > Scheduled Actions.
  3. In the search box, enter subscription ID.
  4. Find the row with the hook ‘woocommerce_scheduled_subscription_payment’ and the status pending.
  5. Hover over the row and and click Run

Clean Up

↑ Back to top

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.

scheduled-action-administration-screen

WooCommerce

The most customizable ecommerce platform for building your online business.

  • 30-day money-back guarantee
  • Support teams across the world
  • Safe and secure online payment