Learn how to set up, customize, and expand the functionality of your WooCommerce products with our library of documentation and tutorials.

Subscriptions Developer Docs


Documents

  • Developer Guide to Failed Recurring Payment Retry System

    WooCommerce Subscriptions is a premium plugin, and version 2.1 introduced a new system to automatically retry a recurring payment that previously failed. This guide provides a technical overview of the Failed Recurring Payment Retry system and is intended for developers looking to customize or otherwise interact with the retry system. We recommend reading the Store Owner Guide […]

  • Developer Guide to Multiple Subscriptions

    This Developer Guide to Multiple Subscriptions provides an overview of the technical implementation of multiple subscription handling for when multiple subscription products are purchased together in the one transaction. For a more comprehensive overview of the system, including the decisions involved in choosing this implementation, refer to the Store Manager Guide to Multiple Subscriptions. If […]

  • Admin Change Payment Method Integration Guide

    This article provides developer documentation for adding support to a payment gateway extension for changing a subscription’s payment method via the Edit Subscription screen. If you are a developer of a payment gateway and have not yet provided support for processing subscriptions, please read the Subscriptions Payment Gateway Integration Guide. Payment Method Change Overview This […]

  • Subscriptions Payment Gateway Integration Guide

    Adding subscription support to your existing payment gateway extension is a great way to attract new customers and provide a sought-after feature for your existing customers. This guide outlines the necessary steps for integrating a payment gateway with WooCommerce Subscriptions. If you are looking for a guide to creating and managing subscriptions in your store, […]

  • How can I deactivate core subscription features, like changing payment methods?

    WooCommerce Subscriptions has a centralized function that checks if specific actions, like changing the payment method or status (e.g., canceling), can be performed on a subscription. This allows WooCommerce developers to disable any action on a subscription as needed. This guide is for WooCommerce developers who want to extend or integrate with the WooCommerce Subscriptions […]

  • How can I remove an action button from the View Subscriptions page?

    If you want to prevent a customer initiating a given action on a subscription, you can remove the button from the My Account > View Subscriptions page. The following plugin demonstrates how to remove a button using the ‘wcs_view_subscription_actions’ hook. By default, only the Change Payment Method button is removed, but you can uncomment additional […]

  • How can I stop Subscriptions from changing a user’s role?

    WooCommerce Subscriptions changes a user’s role by default, when the status of their subscription or subscriptions change, as explained in the Role Settings document. However, it is possible to stop this default behaviour with a small amount of custom code. This setup is helpful when you implement a custom user role or logic on a […]

  • How Subscriptions Handles Staging Sites and Migrations

    WooCommerce Subscriptions can handle staging sites and site migrations. Many hosts provide an easy way to create a clone of your website for testing changes. This is called a staging site. To prevent processing duplicate payments on a clone of your site, WooCommerce Subscriptions disables automatic payments and subscription-related emails when it detects that the […]

  • Subscription Caches

    WooCommerce Subscriptions has a persistent caching system to improve performance by avoiding slow database queries. This system speeds up many functions on the WooCommerce Subscriptions extension, including the amount of time it takes to process a renewal payment, load the My Account > Subscriptions page, and in some cases, load customer facing product and shop […]

  • Subscription Function & Property Reference

    This Subscription Function & Property Reference guide introduces some of the functions available for working with subscription data. It is not intended to provide tutorials on how to achieve certain tasks with a subscription, or as a comprehensive reference of all the subscription methods. If you have yet, you should read the Subscription Developer Overview […]