Buy once or subscribe
This feature will allow you to define subscription frequencies for simple and variable products. By defining one or more frequencies for a simple or variable product, the customers will have 2 options on the product page:
- One-time purchase
- Subscription
There are 2 ways in which subscription plans can be defined for products:
- Setting global subscription plans;
- Setting product-specific subscription plans.
Setting global subscription plans
Global subscription plans allow the admin to define subscription plans for entire categories of products. Global subscription plan settings can be found in WooCommerce – Settings – Buy Once or Subscribe – Global subscriptions.
To set up a global subscription plan you need to:
- Click on the [Add Frequency] button;
- Choose the title for the call to action, e.g. “Choose subscription frequency”. This is optional and if you leave this blank, the default text “Choose Frequency” title will be used;
- Select the product categories you want to add the subscription plans to. All products from the selected categories will display the subscription plan (except subscription-type products);
- Choose the subscription interval. The subscription intervals are imported from Woo Subscriptions;
- Add a percentage discount (without the ‘%’ symbol). The discount will be applied to the regular product price or the sale price if one is set. The percentage discount is optional and if you do not wish for the subscription plan to have a discounted price you can leave the field empty or input ‘0’;
- Click the [Save] button to save the defined global subscription plans.
You can add as many subscription plans as you like. If you have more global plans defined on the page, you can drag and drop them in the desired order using the icon from the left-hand side of the plan. On the front-end product page, the subscription plan options will be displayed in the same order as the one on the Global subscriptions setting page. If you wish to remove a plan, you can click the [Remove] button for the respective plan.
Global subscription plans can only be applied to simple, variable, bundle, and composite product types. If subscription-type products are included in a category for which a global plan has been defined, the global plans will not be displayed on the front-end product page.
Note: If you do not wish to offer a subscription discount to the sale price of a product (the sale price set on the product page) you can use the bos_use_regular_price filter to apply the discount to the regular price. Check our Filter documentation for more information on this filter.
Note: For variable products, subscription plans and discounts are set at the product level. Therefore, all variations will have the same subscription plans and discounts.
Note: Global subscription plans can be overwritten if a product has other plans defined on the product page. See the next section for more information.
Setting product-specific subscription plans
Product-specific subscription plans can be defined on the back-end product page and will overwrite any global plans that might apply to the product. To define subscription frequencies for a product you have to:
- Go to Product Data > Subscriptions tab on the back-end product page;
- Enter a Title for your Call To Action, e.g. “Choose subscription frequency”. This is optional and if you leave this blank, the default text “Choose Frequency” title will be used;
- Click on the [Add Frequency] button to add a subscription plan:
- Choose the subscription interval. The subscription intervals are imported from Woo Subscriptions;
- Add a percentage discount (without the ‘%’ symbol). The discount will be applied to the regular product price or the sale price if one is set. The percentage discount is optional and if you do not wish for the subscription plan to have a discounted price you can leave the field empty or input ‘0’;
- When you are done adding all the frequencies, Publish or Update the product to save the changes.
You can add as many subscription plans as you like. The plans can be ordered and deleted, and this will be reflected in the way the plans will be displayed on the product page.
Note: If you do not wish to offer a subscription discount to the sale price of a product (the sale price set on the product page) you can use the bos_use_regular_price filter to apply the discount to the regular price. Check our Filter documentation for more information on this filter.
Note: For variable products, subscription plans and discounts are set at the product level. Therefore, all variations will have the same subscription plans and discounts.
Front end display
On the product page, the customers will be able to choose between a one-time purchase and a subscription. If a product has more subscription plans defined then the customer will be able to choose the desired plan from a dropdown list.
When the subscription option is selected, the Add to cart button text will change to the text set in the Add to Cart Button Text field from WooCommerce – Settings – Subscriptions.
Once a product has been added to the cart as a subscription, the Woo Subscriptions plugin takes over to complete the checkout and subscription creation process.
If an order contains products with different subscription frequencies, then the products will be grouped according to their subscription frequency and a subscription will be created for each frequency (Woo Subscriptions functionality).
General settings
There are other settings that can be used to change the functionality and appearance of the plugin. These settings can be found in WooCommerce – Settings – Buy Once or Subscribe – General.
Settings for changing the strings displayed on the product page
These settings are:
- Subscribe and save text. Using this field the admin can edit the ‘subscribe and save’ text displayed next to the product price. The field accepts the variable %1$s which can be used as a placeholder within the string for the maximum discount percentage that is available for the product;
- One-time purchase text. Using this field the admin can edit the text for the one-time purchase radio option;
- Subscribe and save up to text. Using this field the admin can edit the text for the subscription radio option. The field accepts the variable %1$s which can be used as a placeholder within the string for the maximum discount percentage that is available for the product;
- Frequency text. Using this field, the admin can edit the frequency label displayed before the subscription plan dropdown;
- Interval display text. Using this field the admin can edit the text displayed in the subscription plans dropdown. The field accepts 3 variables:
- %1$s which can be used as a placeholder within the string for the subscription interval;
- %2$s which can be used as a placeholder within the string for the price of the subscription plan;
- %3$s which can be used as a placeholder within the string for the discount applied for the subscription plan;
- Select options text. This field can be used to edit the [Select options] button text displayed for products with subscription plans defined.
Coupon settings
By default, products bought as subscriptions accept any coupon type that can be applied to a subscription-type product in the cart. If you wish for products bought as subscriptions using Buy Once or Subscribe to be excluded from being discounted using a coupon, you can use the Exclude products bought as subscriptions from coupons setting. When checked, the products bought as subscription will be excluded from the calculation of the coupon discount.
Note: The Exclude products bought as subscriptions from coupons setting only applies to products purchased as subscriptions using the Buy Once or Subscribe plugin. It will not apply to subscription-type products or products bought as a one-time purchase.
Changing Add to Cart button text on the product page
Changing the text for the Add to cart button or Sign up now button can be done using the WooCommerce subscriptions settings and filters.
- The Add to cart button text can be changed by using the WooCommerce filter described in the documentation.
- The Sign up now button text can be changed using the Following WooCommerce Subscriptions setting WooCommerce – Settings – Subscriptions – Add to Cart Button Text
Custom add-to-cart links
In order to add a product to the cart as a subscription using a custom add-to-cart link you will need to know the product ID (and variation ID in case of variable products) for the product you want to add to the cart. The link will have the following structure:
https://domain.com/?add-to-cart={Product ID}&variation_id={Variation ID}&bos4w-purchase-type=1&convert_to_sub_plan_{Product ID}={Subscription interval}_{Subscription period}_{Discount}
An example of a custom add-to-cart link is:
https://domain.com/?add-to-cart=3067&variation_id=3068&bos4w-purchase-type=1&convert_to_sub_plan_3067=1_month_10
In order to add a product to the cart as a one-time purchase, the link structure is the same as for any WooCommerce product:
https://domain.com/?add-to-cart={Product ID}&variation_id={Variation ID}
By default, the above examples will add 1 piece of the product to the cart. If you want to add more than one piece you can use the quantity parameter like in the example below:
https://domain.com/?add-to-cart=3067&quantity=2&variation_id=3068&bos4w-purchase-type=1&convert_to_sub_plan_3067=1_month_10
The subscription period and subscription interval are the ones used by WooCommerce Subscriptions. In case the combination between the subscription period, subscription interval and discount is not matched with any of the frequencies and discounts set on the product, the product will be added to the cart at full price and without a subscription frequency (as a simple or variable product).
Limitations
Sign-Up Fees
New subscription plans generated with Buy Once or Subscribe for WooCommerce Subscriptions do not support sign-up fees.
Adding prorated products/carts to subscriptions
It will not be possible to add a prorated and synchronized product/cart to an existing subscription.
Subscription plans for product variations
In the case of variable products, subscription plans and discounts are set at the product level, not at the variation level. Therefore, all variations of a product will have the same subscription plans and discounts.