Skip to content

Releases: Automattic/woocommerce-subscriptions-core

Version 5.7.1

11 May 04:36
12402c8
Compare
Choose a tag to compare
* Dev - Resolve errors for third-party code using the URLs returned from WC_Subscriptions_Admin::add_subscription_url() and WCS_Cart_Renewal::get_checkout_payment_url() because they were erroneously escaped. #440
* Dev - Enable third-party code to alter the delete payment token URL returned from flag_subscription_payment_token_deletions. #440

Version 5.7.0

04 May 05:08
acf0ec9
Compare
Choose a tag to compare
* Fix - Fatal error from third-party extensions using the `woocommerce_update_order` expecting the second parameter.
* Dev - Pass the subscription object as the second parameter to `woocommerce_update_subscription` hook (and `woocommerce_update_order` for backwards compatibility).
* Dev - Return a response from the WC_Subscription::set_status() function in line with the parent WC_Order::set_status() function.
* Dev - Add the 'wcs_recurring_shipping_package_rates_match_standard_rates' filter to enable third-parties to override whether the subscription packages match during checkout validation.

Version 5.6.0

19 Apr 23:37
a923da6
Compare
Choose a tag to compare
* Fix - Correctly determine subscription free shipping eligibility when the initial payment cart isn't eligible. Fixes erroneous "Invalid recurring shipping method" errors on checkout. #409
* Dev - Fixed precision loss notice that occurs when running PHP 8.1. #428
* Dev - Fix phpcs and semgrep warnings to improve code quality. #429
* Dev - Use `wp_safe_redirect()` when processing a payment method change request. #429

Version 5.5.0

10 Mar 02:33
5f114e1
Compare
Choose a tag to compare
* Fix - When HPOS is enabled, changing your address while paying for a renewal order will update the address on the subscription. #413
* Fix - Prevent admin error notices being shown for the "subscription trial end" event that was caused by no callbacks being attached to this scheduled action. #414
* Fix - Prevent fatal error when copying the `_shipping_address` meta data where the value is not an array. #417

Version 5.4.0

21 Feb 02:58
597035c
Compare
Choose a tag to compare
  • Fix - Remove the recurring shipping method cache that caused bugs for third-party plugins like Conditional Shipping and Payments. #407

Version 5.3.1

01 Feb 00:09
d9befd7
Compare
Choose a tag to compare
  • Fix - Fatal error when loading the Edit Subscription page with custom admin billing or shipping fields. #403

Version 5.3.0

27 Jan 00:00
d37bd4d
Compare
Choose a tag to compare
* Add - Highlight subscriptions with overdue payment in list view with red icon & tooltip.
* Fix - Shipping address correctly set when resubscribing or switching subscriptions that contain different billing and shipping addresses.
* Fix - When processing customer requests to update all their subscription payment methods, ensure the updated subscription is used fetch the new payment meta, not and old instance.
* Dev - Remove deprecated `strptime` function in favour of `DateTime::createFromFormat`.
* Fix - Catch exceptions when changing payment method associated with a subscription to avoid fatal errors.

Version 5.2.0

23 Jan 04:18
5caa381
Compare
Choose a tag to compare
* Add - New wcs_set_order_address() helper function to set an array of address fields on an order or subscription.
* Fix - Edit, add, and list Subscription admin pages now work when HPOS is enabled.
* Fix - Fixed issues where multiple subscription purchases wouldn't appear on the My Account > Subscriptions screen, on HPOS environments.
* Fix - Refactor `WCS_Meta_Box_Subscription_Data::save` to support HPOS stores, fixing a PHP warning notice when updating an order via the Edit Order screen.
* Fix - Set the `download_permissions_granted` value when purchasing a downloadable subscription product when HPOS is enabled.
* Fix - When a customer changes their address on their account or subscription, make sure the new address is saved when HPOS is enabled.
* Fix - Removed the potential for an infinite loop when getting a subscription's related orders while the subscription is being loaded.
* Fix - Refactor `WC_Subscriptions_Renewal_Order::get_failed_order_replaced_by()` to support HPOS stores.
* Fix - Refactor the `WC_Subscriptions_Tracker` class to support HPOS stores.
* Fix - "Subscriptions by Payment Gateway" in WooCommerce → Status now shows the correct values when HPOS is enabled.
* Fix - Check whether the order actually exists before accessing order properties in wcs_order_contains_subscription()
* Fix - Replace the get_posts() used in get_subscriptions_from_token() to support HPOS stores.
* Fix - On HPOS stores, when a subscription's parent order is trashed or deleted, make sure the related subscription is also trashed or deleted.
* Fix - On HPOS stores, when a subscription is trashed or deleted, make sure it is cancelled first.
* Fix - Merge any custom meta_query args passed to wcs_get_orders_with_meta_query() to avoid overriding WC core args that map onto meta_query.
* Fix - Filtering the Subscriptions List Table by customer, product ID and payment method, now works on stores with HPOS enabled.
* Fix - Prevent erroneously resyncing a subscription every time it is loaded from the database on HPOS environments.
* Fix - Fix "Trying to get property 'ID' of non-object" errors on the edit subscription screen when HPOS is enabled.
* Fix - When HPOS is enabled, clicking the related orders link on the Subscriptions Table now filters the table with the related orders (previously all orders were shown).
* Fix - On HPOS environments, ensure subscription related order caches are updated when relationship order meta (eg `_subscription_renewal` or `_subscription_switch`) is updated.
* Fix - Show subscription status filters/views above the subscriptions list table on stores with HPOS enabled.
* Fix - Reorder the edit subscription meta boxes on HPOS environments so the line items meta box appears after the subscription data.
* Fix - On HPOS environments, prepopulate the subscription start date when creating a new subscription via the admin edit screen.
* Fix - On HPOS environments, handle the admin subscriptions list table bulk actions and row actions in a HPOS compatible way.
* Fix - On HPOS environments, admin notices might show incorrect subscription or order link as part of the admin notice.
* Fix - On HPOS environments, parent order link on subscription edit page, in subscription details box, is incorrect.
* Fix - On HPOS environments, update cache when subscription is trashed, deleted, or restored / untrashed.
* Fix - Replace code using wp_count_posts( 'shop_subscription' ) with data store function to count subscriptions grouped by statuses on stores with HPOS enabled.
* Dev - Replace code using get_post_type( $subscription_id ) with WC Data Store get_order_type().
* Dev - Add subscriptions-core library version to the WooCommerce system status report.
* Dev - Introduced a WCS_Object_Data_Cache_Manager and WCS_Object_Data_Cache_Manager_Many_To_One class as HPOS equivalents of the WCS_Post_Meta_Cache_Manager classes.
* Dev - Introduced a new `untrash_order()` in the `WCS_Orders_Table_Subscription_Data_Store` class to fix untrashing subscriptions on stores that have HPOS enabled.
* Dev - Moved the trash, untrash & delete related `add_actions()` in the `WC_Subscriptions_Manager` class to be added on the `woocommerce_loaded` action.
* Dev - Update `wp_delete_post()` code that was used to delete a subscription to use CRUD methods to support HPOS.
* Dev - Fix phpcs violations in the `WC_Subscriptions_Tracker` class to improve code quality.
* Dev - Fix phpcs violations in the `WCS_Admin_System_Status` class to improve code quality.

Version 5.1.0

24 Nov 01:28
121ef4b
Compare
Choose a tag to compare
* Fix - Set payment tokens when copying data between orders and subscriptions in a CRUD compatible way. Fixes PHP notices during renewal order process.
* Fix - Infinite loop that can occur with `WCS_Orders_Table_Subscription_Data_Store::read_multiple()` on HPOS-enabled stores.
* Fix - On HPOS stores, when querying for subscriptions with wcs_get_orders_with_meta_query() with status 'any', ensure that wc_get_orders() queries for subscription statuses.
* Fix - On HPOS stores, when saving a subscription make sure subscription properties (ie `_requires_manual_renewal`) are saved to the database.
* Fix - On HPOS stores, when a subscription is loaded from the database, make sure all core subscription properties are read directly from meta.
* Fix - When viewing My Account > Subscriptions, fix an issue where no subscriptions were listed when HPOS is enabled.
* Fix - On HPOS stores, ensure payment tokens are copied from the subscription to the renewal order.
* Fix - Refactor `WCS_Meta_Box_Schedule::save` to support HPOS stores, fixing a PHP warning notice when updating an order via the Edit Order screen.
* Fix - Return a fresh instance of the renewal order after creating it. Fixes caching issues on HPOS sites where the returned order has no line items.
* Fix - Processing a manual renewal order with HPOS and data syncing enabled correctly saves the related order cache metadata on the subscription and prevents the post and order meta data getting out of sync.
* Fix - Use supported CRUD apis to determine if subscriptions are present on store (`wcs_do_subscriptions_exist`)
* Fix - With HPOS and data syncing enabled, updating the status of a pending manual renewal order to a paid status correctly activates the related subscription.
* Update - Refactor the `wcs_is_subscription` helper function to support HPOS.
* Update - Refactor our Related Orders data store classes (WCS_Related_Order_Store_Cached_CPT and WCS_Related_Order_Store_CPT) to use CRUD methods to support subscriptions and orders stored in HPOS.
* Update - Display related orders table when viewing the new "Edit Order" page (HPOS enabled stores).
* Fix - On HPOS stores, make sure the links in the related-orders table redirect to the new Edit Order URL.
* Dev - Removed the deprecated "wcs_subscriptions_for_{$relation_type}_order" dynamic hook used to filter the list of related subscriptions for the given relation type. The following hooks have been removed with no alternative:
        wcs_subscriptions_for_renewal_order
        wcs_subscriptions_for_switch_order
        wcs_subscriptions_for_resubscribe_order
* Dev - Introduce a WC_Subscription::set_status() function to handle subscriptions set with a draft or auto-draft status. Replaces the need for the overriding WC_Subscription::get_status() which has been deleted.
* Dev - Manual renewal orders created with HPOS and data syncing enabled are properly linked to the subscription by its `_subscription_renewal` meta and backfilled to posts table.

Version 2.5.2

15 Nov 09:22
Compare
Choose a tag to compare
* Fix - When creating a subscription via the checkout, make sure a new instance of the subscription is attached to the `woocommerce_checkout_subscription_created` action hook.