How to troubleshoot duplicate or unprocessed renewal payments in WooCommerce Subscriptions

Last Updated on: 7th February 2017, 08:17 am

How WooCommerce Subscriptions renewal payments can fail

WooCommerce Subscriptions renewal payments can show faulty behaviour by either not being processed or by being processed twice (or more). Here is what you can do when trying to troubleshoot this. Here is a checklist with troubleshooting steps. Scroll down for explanations and information about the steps.

How renewal payments are managed

WordPress schedules all timed events using its cron service. WooCommerce Subscriptions uses its action scheduler which is based on WordPress cron. When payments fail or are being processed twice, here is what you can check.

Diagnostic steps

  • Check the order notes of the failed order. Occurring errors are collected and printed out there. Most of the time it will provide an explanation or hint as to what went wrong.
  • Put your site into debug mode. Try triggering a test renewal. Here is more information on our WooThemes documentation on how to test a WooCommerce Subscriptions renewal payment. Also check the scheduled action of WooCommerce Subscriptions carefully. Are there any double entries?
  • Install and activate: https://wordpress.org/plugins/wp-crontrol/ – this plugin allows you to check the status of cron jobs. Go to the Tools -> Cron Events menu to manage cron events. There, all cron jobs are listed. Look at the “Recurrence” column. Any cron that has “Now” in the “Recurrence” column has failed. “Now” means “I should run now, but cannot”, thus it indicates a cron not running / failed.
    Once the now vanishes and is replaced by dates in the future, you know your cron jobs are working normally again.
  • Schedule a post for publishing to test CRON
  • Sometimes the cord is simply not plugged in. Check whether cron is disabled in your wp-config.php you can do so manually or via a plugin.
  • A known issue can occur if the server date / time settings have been changed.

    WooCommerce Subscriptions uses the action scheduler by ProsPress which aligns itself with the creation date of the Subscription. Once the server time has been changed, the action scheduler sometimes aligns itself again, creating a double charge for the Subscription, as it falsely considers the Subscription to have two creation dates at that point. This behaviour was completely fixed as of versiob 2.1 in WooCommerce Subscriptions. If you believe this is the case and you are getting double charges, please open a ticket at http://woocommerce.com and describe in the ticket when and how the server time was changed.  

Troubleshooting steps

And as always, take a backup before you get to work.

2 responses

  1. After updating to woocommerce 3.x. I am having problem with with subscription renewal order (woocommerce subscription v2.2.4).
    The Subscription renewal order created is null. Here is the screenshot : https://ibb.co/fbEYFk
    http://tinypic.com/r/2cg28ue/9

    1. Con Schneider Avatar
      Con Schneider

      Hi Mahesh,

      This looks as if you will need to debug this.
      I would create a staging site, put your gateway in testing, turn on debugging, trigger a renewal processing with the failed WooCommerce Subscriptions and see if I can reproduce a null order.

Leave a Reply

Your email address will not be published. Required fields are marked *

Con Schneider