Subscriptions 2.3 is here!

Subscriptions version 2.3 was released on July 5th. We are excited to introduce a number of new features in this release along with performance enhancements, fixes, and other changes that may be interesting to developers. This post will take you through some of the changes coming in this release of Subscriptions.

New Features

We are excited to introduce some highly-requested new features that will be released with this version. These new features involve more options when dealing with synchronized products, coupons, and customer renewal, as well as a feature to help your store run more smoothly. Below are summaries for each of these features and tidbits to let you hit the ground running.

Charge full price at time of sign up for synchronized products

When selling a synchronized subscription, if the subscriber purchased the subscription on a day other than the sync date, there would be no immediate charge except in certain circumstances, such as prorating the initial amount. For example, if a subscription was synchronized to the 1st of the month, then a customer purchasing it on the 15th would pay nothing up front and be charged the following 1st. Or, if the subscription was prorated, they would pay only a portion of the total price up front.

There are several use cases in which charging the full amount up front would be useful. This new option makes that possible.

On the WooCommerce > Settings > Subscriptions screen, under the Synchronisation heading there is an option to “Prorate First Renewal”. There is a new option in this dropdown that allows the store manager to choose to charge the full amount of the product at sign-up, no matter the date.

Create limited recurring coupons

When applying a coupon to a subscription, there are options to create coupons that will apply time after time. But, what if you want to only have a coupon apply for the first 3 payments? This new coupon feature enables coupons to be limited to only the chosen number of payments.

When creating a coupon that is for a recurring product, a field will appear labeled “Active for x payments”. The default will be blank, meaning that the coupon will be active for the duration of the subscription. Filling in this field with a number will ensure that the coupon is only active for that number of payments, including the initial payment.

Screenshot of coupon page

Allow customers to renew early

Store managers have the ability to process a renewal order manually from the Edit Subscription screen. Now customers will have the ability to process a renewal as well. This feature allows customers to renew their subscription early, meaning they don’t have to wait until the renewal date for the payment to process.

On the customer’s View Subscription page, there will be a button labeled “Renew Now”. After pressing this button, customers will be taken through checkout and pay for their renewal immediately. The next payment date will be pushed forward the appropriate amount of time. For example, say a subscription renews monthly on the 5th and the next payment date is August 5th. On the 26th of July, the customer decides to renew early. The next payment date will account for this renewal and be changed to September 5th.

Screenshot of renew button

This feature can enabled or disabled on the WooCommerce > Settings > Subscriptions screen under the “Renewals” section. Early renewal will be disabled on existing stores and enabled on new stores by default.

Link a subscription to a parent order

Sometimes a subscription exists without a parent order. This often happens when a subscription is created manually. However, having a parent order becomes important during certain situations. Particular payment gateways require a parent order and the flow of events when processing a parent order versus a renewal order can differ. This new feature allows store managers to connect a subscription with an existing order to make it a parent order for the subscription.

On the Edit Subscription screen, below the subscription status, there is now a field that lists the parent order number or an empty dropdown field.

Screenshot parent filled

Screenshot parent empty

If the field is empty, you may click on the dropdown in order to search for and choose an order to become the parent order for the subscription. The orders are listed by number.

Screenshot parent select

A pending parent order can also be created from a subscription. An invoice for this order could then be sent to a customer, which will activate the subscription when paid.

In the “Subscription actions” box on the right side of the Edit Subscription screen, there is an option in the dropdown to “Create pending parent order.”

Screenshot parent create

Performance

As your subscription business grows, you don’t want software bogging you down. Subscriptions strives to meet the needs of a broad range of businesses, including those who grow to large scales. These performance changes reduce the potential for growing pains and improves Subscriptions for everyone.

Add persistent cache of related order IDs to subscription meta

When retrieving a list of related orders for a subscription, there sometimes has to be a query to the database to get these related orders. This can be slow and cumbersome, especially on large-scale sites. Adding a persistent cache of related orders that updates without having to recourse to a query avoids this performance bottleneck.

Add persistent cache of customer subscriptions

Similar to the above, running a query on data can be slow, especially on large-scale sites. By creating a persistent cache, performance will be improved for retrieving customer subscriptions.

Update Action Scheduler

Action Scheduler is a library used by Subscriptions to run actions at certain times. Many updates have been made to Action Scheduler, especially to enhance performance on a large scale.

Improve performance of getting a variable product’s min and max variation data

When loading a variable product on the shop page, the minimum and maximum data associated with that product needs to be calculated. It is these calculations that are behind the text that shows the lowest price of the product, for example. However, when there are many variable products or many variations, these calculations could be intensive. Improvements have been made for getting this data so that the shop pages can load faster.

Boost performance of admin subscription search

When searching subscriptions from the admin screen, the billing and shipping addresses are included in the fields searched. Previous to WooCommerce 3.0 these fields were many and separate. The billing and shipping addresses have since had a field added that is a combination of the other fields to allow for better search performance. This change takes advantage of those fields to improve admin subscription search performance.

Fixes & Tweaks

Require WooCommerce 2.6 or newer

This version of Subscriptions will require the use of WooCommerce version 2.6 or newer.

Repair subscriptions that have been suspended in PayPal but not in WooCommerce

For a period, when subscriptions were suspended directly on the PayPal website they were not also suspended in WooCommerce. This problem persisted from Subscriptions version 2.1.4 until version 2.2.8, when this bug was fixed. While the root issue was fixed, the already affected subscriptions would still be out of sync with PayPal. This script will align the WooCommerce subscription statuses with the PayPal statuses.

Use parent product instead of variation when checking product limitation

When a product is limited, it shouldn’t be possible to have multiple subscriptions to that product, including different variations. This fix ensured that limiting rules were followed, especially with regard to variable subscriptions and re-subscribing.

Remove one-time fees from renewals

When adding fees using the WooCommerce fees API, it is possible to set fees for only the initial order. That means that only the initial order, or cart, should have those fees. This fix makes sure that fees that are meant to be one-time are not applied to following renewal orders.

Exclude trashed subscriptions in Reports calculations

When calculating the counts for the subscriptions reports, this fix excludes trashed subscriptions from the counts. Trashed subscriptions are those that have been purposely trashed by the store manager and can be excluded from the counts that are used to make informed decisions.

Hide recurring coupons in the initial cart if they don’t apply

Recurring coupons are those that apply to subscriptions and their renewals. There are instances where a recurring coupon does not apply to the initial purchase, such as if it has a free trial, yet still appears in the cart items. This fix hides the coupon in the initial cart if it does not apply.

For Developers

New sections in system status

A number of new sections have been added to the system status. These new sections will further help support provide assistance.

The new sections include:

  • An overview of the site’s subscriptions statuses.
  • Whether the store has been connected to a WooCommerce Account via the WooCommerce > Extensions screen.
    • and if it has, whether this site has an active WooCommerce Subscriptions product key.
  • Whether the site has custom retry rules. This will only appear if the retry system is enabled.
  • A new Payment Gateways section which includes:
    • Which payment gateways are enabled.
    • What features each payment gateway supports.
    • How many subscriptions are set to use each payment gateway, broken down by status.

Screenshot system status

Ensure pre-WooCommerce 3.0 subscriptions have billing and shipping address indexes

Changes were made to how the billing and shipping addresses of subscriptions are searched. This change takes advantage of the new billing and shipping address index fields that were introduced in WooCommerce version 3.0. However, older subscriptions created before that version would not contain those indexes and thus be excluded from the search. This change ensures that older subscriptions have these fields and the search works as intended.

Change created_via meta on renewal orders

Orders have a created_via meta in WooCommerce, which defaults to ‘checkout’. For subscriptions, this meta will now be changed to ‘subscription’ for renewal orders. While this is a broad change, one issue that it addresses deals with the retry system and the hold stock setting. The default hold stock setting is set to one week in Subscriptions, the same default time it takes for the retry system to complete its cycle. If these values are changed from their defaults, there was a possibility for interference in that the stock hold could expire and cancel the order before the retry system had finished. This fix removes that conflict.

Add arguments to woocommerce_checkout_create_subscription filter

Arguments for the $cart and $order were added to this filter. This allows third parties to access the cart and order objects used to create subscriptions.

Remove TLC transients library and cache manager

The TLC transient library and the cache manager class that utilized it have been removed in favor of using WordPress transients. The TLC transients weren’t compatible with external object caches, such as Memcached, and so could cause issues. Removing this library should improve compatibility.

Refactor code for date columns on subscriptions table

The code for the date columns on the subscriptions table was refactored to reduce code repetition and better allow third parties to add columns.

Require PHP 5.6 or newer

Notes on the PHP version requirements have been updated.

Add a filter to allow third-parties to filter orders by custom order types

On the admin orders screen, there is a drop-down menu that allows users to filter the orders by order type. It is possible for plugins to create custom order types. This filter allows third-parties to also choose which meta key is used in a query to return those custom orders.

Add filter to control automatic single subscription redirect on customer account page

The menu on the “My Account” page has a tab called “Subscriptions”. Clicking on the “Subscriptions” tab takes the customer to a list of their subscriptions. When a customer has one subscription, that tab is labeled “My Subscription”. Clicking on that tab will take the customer directly to view their subscription. This reduces the steps taken by the customer to get to their subscription. This automatic redirect for single subscriptions is now controlled by a filter called wcs_my_account_redirect_to_single_subscription. The default setting for this filter is true, meaning that the redirect will happen. The filter can be set to false in order to prevent the redirect.

Conclusion

From highly-requested features to performance enhancements, we are glad to bring you this newest release of Subscriptions. We hope that this will help you run your store more smoothly and with more flexibility. Keep an eye out for more releases and other add-ons, such as Gifting for WooCommerce Subscriptions.

Share:

More from the blog

5 responses to Subscriptions 2.3 is here!

  1. Natalio

    Bulk Update Subscription Price when Subscription Product Price Changes
    Are You working on a free mini-extension that could help?

    • james

      Hi Manoj, we’re not able to provide an ETA on that feature at the moment. We decided fairly early on that we would release this feature as a separate extension as the codebase and the complexities in the feature were growing.

      Once we’re able to provide more details and an ETA, we’ll update our feature roadmap.

Comments are closed.