Home > Docs > Subscriptions for WooCommerce > Alter WooCommerce Subscription Billing Interval

Alter WooCommerce Subscription Billing Interval

Last updated on July 12, 2023

The Subscriptions for WooCommerce plugin by default supports fixed subscription and billing intervals, such as every 1st to every 6th (day, week, month, and year). However, there may be instances that may require a different interval that is not available in the default options. This article explains how to customize the subscription/billing interval using a code snippet with the Subscriptions for WooCommerce plugin.

Subscriptions for WooCommerce - Add product page
Subscriptions for WooCommerce – Add product page

Modify billing interval

To modify the billing interval:

  1. From the WordPress dashboard, navigate to Appearance > Theme File Editor > functions.php file.
  2. Copy the code snippet provided below.
  3. Paste the code snippet into the end of the functions.php file.
  4. Customize the Subscription/Billing Interval based on requirements.
  5. Save the changes to the function.php file.

Code snippet

In the scenario where a company releases a comic book every ten months, there arises a requirement to establish a billing interval of ten months. This can be accomplished by incorporating the option every 10th within the billing interval settings. Consequently, the plugin page will be presented as follows:

Subscriptions for WooCommerce - Add product page
Subscriptions for WooCommerce – Add product page