Title: WooCommerce Subscriptions: Code that processes renewals?
Last modified: February 26, 2025

---

# WooCommerce Subscriptions: Code that processes renewals?

 *  Resolved [jswoolf01](https://wordpress.org/support/users/jswoolf01/)
 * (@jswoolf01)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/woocommerce-subscriptions-code-that-processes-renewals/)
 * Our WooCommerce store includes memberships, which are created and sold as a type
   of subscription. The subscription term is one month and it auto-renews every 
   month until canceled. We use Keap (InfusionSoft) tags to track certain aspects
   of each subscription, and naturally the tags should renew every month when the
   subscription does. However, there are some bugs in the Keap part of this process,
   which I need to find and fix.
 * Problem: I can’t find the code that is handling the Keap updates. I can’t even
   find the code that processes the renewals themselves in WooCommerce Subscriptions.
   I’ve searched do_action() calls, I’ve searched add_action and add_filter calls,
   and I can’t find anything that looks relevant. I see a lot of do_action calls
   that name hooks, but no associated add_action or add_filter calls. I see several
   hooks that might be associated with renewals, but the names never appear in any
   do_action() call. The most confusing part is some add_filter() calls that have
   arrays of arrays as the second parameter, such as:
 *     ```wp-block-code
       switch ( $webhook->get_resource() ) {            case 'order':                $topic_hooks['order.created'][] = 'wcs_webhook_order_created';                break;            case 'subscription':                $topic_hooks = apply_filters( 'woocommerce_subscriptions_webhook_topics', array(                    'subscription.created'  => array(                        'wcs_api_subscription_created',                        'wcs_webhook_subscription_created',                        'woocommerce_process_shop_subscription_meta',                    ),                    'subscription.updated'  => array(                        'wcs_webhook_subscription_updated',                        'woocommerce_update_subscription',                    ),                    'subscription.deleted'  => array(                        'woocommerce_subscription_trashed',                        'woocommerce_subscription_deleted',                        'woocommerce_api_delete_subscription',                    ),                    'subscription.switched' => array(                        'wcs_webhook_subscription_switched',                    ),                ), $webhook );                break;        }
       ```
   
 * What does this code do? How do I trace this maze of actions that are named but
   apparently never called, and filters that are written but don’t seem to ever 
   be run? Is there some trick to tracing filter and action calls, other than “search
   for the filter/action name in the site code and see what comes up?” How can I
   find the code I’m looking for?

Viewing 1 replies (of 1 total)

 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/woocommerce-subscriptions-code-that-processes-renewals/#post-18331557)
 * Hi there!
 * WooCommerce Subscriptions handles renewals through various hooks, such as:
    - `woocommerce_scheduled_subscription_payment` (when a renewal payment is due)
    - `woocommerce_subscription_renewal_payment_complete` (when a renewal is successful)
 * For more details you can use this article. [https://woocommerce.com/document/subscriptions/develop/action-reference/](https://woocommerce.com/document/subscriptions/develop/action-reference/)
 * If your concern is specifically about Keap (InfusionSoft) tags not updating, 
   that would depend on how your integration is set up. **In this forum, we only
   provide support for WooCommerce core features, and third-party integrations are
   out of scope.**
 * To confirm if WooCommerce Subscriptions is processing renewals correctly, you
   can:
    - Check if renewal orders are being created in WooCommerce.
    - Use a tool like [Query Monitor](https://wordpress.org/plugins/query-) to trace
      hooks in action.
 * If renewals are working correctly in WooCommerce but Keap is not updating as 
   expected, I’d recommend reaching out to Keap support or your developer for further
   assistance in debugging the integration. I can recommend [WooExperts](https://partners.woocommerce.com/English/marketplace/)
   and [Codeable.io](https://woocommerce.com/codeable/) as options for getting professional
   help. Alternatively, you can also ask your development questions in the [ WooCommerce Community Slack](https://woocommerce.com/community-slack/)
   as custom code falls outside our usual [scope of support](https://woocommerce.com/support-policy/#customization).

Viewing 1 replies (of 1 total)

The topic ‘WooCommerce Subscriptions: Code that processes renewals?’ is closed to
new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [subscriptions](https://wordpress.org/support/topic-tag/subscriptions/)

 * 1 reply
 * 2 participants
 * Last reply from: [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/woocommerce-subscriptions-code-that-processes-renewals/#post-18331557)
 * Status: resolved