Minimum Periods for WooCommerce Subscriptions

Big News! 🎉 Coming soon in Elementor Connector: Unlock the Minimum Periods for WooCommerce Subscriptions Elementor widget! Show subscription minimum periods in Elementor anywhere you’d like.

Overview of Minimum Periods

↑ Back to top

Minimum Periods for WooCommerce Subscriptions is an extension for WooCommerce that allows shop owners & administrators to restrict the display of the “Cancel” button for active subscriptions on the customer’s account page. Shop owners & administrators can provide access to that button by configuring the number of minimum payments/renewals that should be made before the “Cancel” button is available.

Installation

↑ Back to top

Once you’ve purchased Minimum Periods for WooCommerce Subscriptions, you can download the plugin from your confirmation email or WooCommerce account. To install it, follow these steps:

  1. Go to Plugins > Add New > Upload
  2. Select the ZIP file you just downloaded
  3. Click Install Now, and then Activate

Once you’ve installed and activated the plugin, navigate to WooCommerce > Settings > SubScriptions > Cancelling to configure the plugin.

More information at: Installing and Managing Plugins.


Setup and Configuration

↑ Back to top

Storewide Settings

↑ Back to top

To configure minimum periods for all subscriptions products, navigate to WooCommerce > Settings > SubScriptions > Cancelling:

  • Enable Cancelling: Enable to allow customers to cancel their active subscriptions. Disabling this means that no subscription on your website can be cancelled.
  • Minimum Period(s): Set the minimum number payments/terms (also known as payments) that a customer needs to have completed before the cancellation button is visible in the account page on the front-end. A payment is counted when the order status is set to Completed.
  • Show in Product Pages: Enable to show the number of periods/terms that need to be completed before cancellation is possible. This section will show above the add-to-cart button on the single product page.
  • Show in Cart/Checkout: Enable to show the number of periods/terms that need to be completed as part of the subscription meta. This section will show as line-item meta information on the cart and checkout page.
  • Show Paid Periods: Enable to show the number of paid periods/terms that have already been completed. This field will only be shown on the my-account page for your customer.
  • Show in Account Page: Enable to show the number of periods/terms that need to be completed before cancellation is possible. This field will only be shown on the my-account page for your customer.
  • Show as Subscription Meta: Enable to show the number of periods/terms that need to be completed as part of the subscription meta. This field will be shown on the checkout confirmation page, on the my-account page and in the order-confirmation emails.

Setting the number of Minimum Period(s) to 0 will result in customers being able to cancel their subscriptions immediately.

Per Subscription Settings

↑ Back to top
Minimum period settings on a per-subscription product basis.

To configure minimum periods on a per-product basis, navigate to Products > All Products > Your Subscription Product > Product Data > General > Cancelling:

  1. Select Override storewide settings to overide the default store settings outlined in the previous section
  2. Enter the number of Minimum Period(s) (also known as payments) that a customer needs to have completed for this subscription product before the cancellation button is visible in the account page on the front-end.

Per Variable Subscription Settings

↑ Back to top

Since version 1.1, minimum periods can also be configured on a per variable subscription basis. To configure minimum periods per variation, navigate to Products > All Products > Your Subscription Product > Product Data > Variations > Your Variation Cancelling:

  1. Select Override storewide settings to overide the default store settings outlined in the previous section
  2. Enter the number of Minimum Period(s) that a customer needs to have completed for this variation before the cancellation button is visible in the account page on the front-end.

Usage

↑ Back to top

On the customer’s account page under My-Account > Subscriptions, the customer will see the “Cancel” button if any of the following conditions are met:

  1. The Allow Cancelling checkbox is selected under WooCommerce > Settings > SubScriptions > Cancelling
  2. The Minimum Period(s) have been reached as configured in either the storewide settings or on the per-product settings

In instances where the Allow Cancelling checkbox is not selected or the Minimum Periods have not been reached, customers will only see the details of the subscription without having an option to cancel.

Hiding the cancel button when minimum periods have not been reached.

Shortcodes

↑ Back to top

Minimum Periods for WooCommerce Subscriptions provides two powerful shortcodes that allow you to display minimum period information anywhere on your website. Below are the details and usage instructions for each shortcode.

1. [mpws_minimum_period]

↑ Back to top


This shortcode displays the minimum number of periods/terms that need to be completed before a customer can cancel their subscription. This shortcode is versatile and can be used on any page or post to inform customers about the cancellation policy.

Attributes:

  • id (optional):
    • Description: The Product ID or Variation ID for which you want to display the minimum period.
    • Default: If not provided, and the shortcode is used on a product page, it will automatically use the current product’s ID.
    • Example: id="123" or id="456"

Usage Examples:

  1. Basic Usage (Within a Product Page):If you place the shortcode on a product page without specifying an ID, it will automatically display the minimum period for that product. [mpws_minimum_period]
  2. Specifying a Product ID:To display the minimum period for a specific product, provide the id attribute. [mpws_minimum_period id="123"]
  3. Specifying a Variation ID:For variable subscriptions, you can specify a variation ID. [mpws_minimum_period id="456"]

2. [mpws_minimum_period_table]

↑ Back to top


This shortcode displays a table of subscription variations along with their respective minimum periods. This is especially useful for variable subscription products where each variation may have different minimum period requirements

Attributes:

  • id (optional):
    • Description: The Product ID for which you want to display the variations table.
    • Default: If not provided, and the shortcode is used on a product page, it will automatically use the current product’s ID.
    • Example: id="123"

Usage Examples:

  1. Basic Usage (Within a Variable Subscription Product Page): If you place the shortcode on a variable subscription product page without specifying an ID, it will automatically display the variations table for that product. [mpws_minimum_period_table]
  2. Specifying a Product ID:To display the variations table for a specific product, provide the id attribute.[mpws_minimum_period_table id="123"]

Notes:

  • The [mpws_minimum_period_table] shortcode is primarily designed for Variable Subscription products. If used with a Simple Subscription product, it will display the minimum period for that single product.
  • Ensure that the product ID or variation ID provided in the shortcode corresponds to a valid subscription product to avoid empty outputs.

Frequently Asked Questions

↑ Back to top

Will the cancel button be hidden immediately upon activation of the extension?

Yes – As soon as the extension is activated, the “Cancel” button will be hidden on the customer’s account page on the front-end.


How are minimum periods calculated?

Minimum periods are based on the number of completed orders that have been placed (a new order is created for each renewal). This also includes the initial order of the subscription product. As an example: If a subscription can only be cancelled after the first renewal, the minimum period to set is 2. This includes the original order and the first renewal.


Can I configure minimum periods for variable subscriptions?

Yes – Since version 1.1, minimum periods can be configured for both simple subscriptions and variable subscriptions.


This varies between countries. Before disabling the “Cancel” button, we recommend discussing potential implications with a legal professional.


Will minimum periods apply to current subscriptions or only to new subscriptions?

It will apply to all current and future active subscriptions. Deactivating the extension also means that the cancellation button will be visible for all subscriptions.


Does minimum periods disable the “Suspend” button as well?

No – At the moment, Minimum Periods for WooCommerce Subscriptions will only remove the “Cancel” button. To hide the “Suspend” button for all subscription products, configure the settings under WooCommerce > Settings > Subscriptions > Customer Suspensions to 0.


Can customers cancel during a free trial?

Yes – Free trials by their very nature mean that no payments have taken place yet and that they’ll only have the product for a trial period (unless cancelled or the subscription is processed). During the trial period, subscriptions can be cancelled regardless of the minimum period that is configured.


Is it possible to show the number of paid terms/periods on the my-account page?

Yes – Version 1.4 allows store owners/manager to configure settings under WooCommerce > Settings > Subscriptions > Cancelling > Show Paid Periods to optionally display the number if paid terms/periods on the my-account page. If enabled, the my-account page will look as follows:


Is it possible to show the minimum terms/periods for the subscription on the my-account page?

Yes – Version 1.4 allows store owners/manager to configure settings under WooCommerce > Settings > Subscriptions > Cancelling > Show in Account Page to optionally display the number if minimum periods on the my-account page.

When configured correctly, the subscription overview on the front-end under the my-account page will appear as follows:


Is it possible to show the minium terms/periods for the subscription on order confirmation emails?

Yes – Version 1.5 allows store owners/managers to configure settings under WooCommerce > Settings > Subscriptions > Cancelling > Show in Subscription Meta to optionally display this informatio.

When configured correctly, the subscription meta information containing the minimum periods will look as follows:


Does Minimum Periods work with other product types?

Not by default – It is possible to add other product types (e.g. simple, external etc.) to show minimum periods meta information on the following pages:

  • The order confirmation page after successful payment
  • The orders page on the customer’s my-account area
  • The subscription page on the customer’s my-account area

Note: The minimum periods for these product types cannot be set on a per-product basis. Instead, it will use the global settings found under WooCommerce > Settings > Subscriptions > Cancelling > Default Minimum Period(s).


Does Minimum Periods work with All Products for WooCommerce Subscriptions?

Yes and no – All Products for WooCommerce Subscriptions adds subscription functionality to non-subscription products (e.g. simple, variation, bundle). At the moment, our plugin does not add extra options to configure minimum periods on a per-product basis for non-subscription products.

It is, however, possible to use the global minimum periods (as configured under WooCommerce > Settings > Subscriptions > Cancelling > Default Minimum Periods) for non-subscription products that have a subscription plan (powered by All Products for WooCommerce Subscriptions). To show the minimum / paid period(s), please use the following code snippet:

add_filter( 'mpws_product_types', 'mpws_add_product_types', 5, 1 );

function mpws_add_product_types( $mpws_allowable_product_types ) {
	$mpws_allowable_product_types[] = "simple";
	return $mpws_allowable_product_types;
}

You can change simple in the code above to match the product types you’d like to see minimum periods for. For a list of pages where these minimum periods are shown, please refer to the question above.


Is it possible to show the minium terms/periods for the subscription on the single product page?

Yes – Version 2.3 allows shop owners/managers to display the period to be show on the single product page. To enable this, ensure the checkbox found under WooCommerce > Settings > Subscriptions > Cancelling > Show in Product Pages are selected.

Please note the following limitations:

  • The minimum periods will only be shown for Simple Subscription products. At the moment, Variable Subscription products are not supported.
  • The minimum periods will show about up above the add-to-cart button on the single product page.

Is it possible to show the minium periods for the subscription on the cart/checkout pages?

Yes – Version 2.3 allows shop owners/managers to display the periods for each subscription product as line-item meta information on the cart/checkout page. This information is visible below the product title on order overview section.


Is this compatible with HPOS (High Performance Order Storage)?

Yes – Version 2.2 declares compatibility with HPOS.


Is this compatible with the new Cart / Checkout Block for Gutenberg?

Yes – Version 2.3 adds support for both the new cart / checkout block experience in WooCommerce while maintaining support for the traditional shortcode method.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.