The latest version is WooCommerce Subscriptions 7.0.0, Released on December 16, 2024
Here’s what’s changed in WooCommerce Subscriptions Version 4.7.0
* Add: New wcs_get_orders_with_meta_query() helper function to query for orders and subscriptions.
* Add: New WCS_Orders_Table_Subscription_Data_Store class to support subscriptions stored in High-Performance Order Storage (HPOS).
* Add: New WCS_Orders_Table_Data_Store_Controller class to load the proper subscriptions data store when the store has HPOS enabled.
* Add: New data copier class to copy data to subscriptions and related orders in place of direct database queries in prepraration for HPOS support.
* 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.
* Fix: Switch orders not appearing in related orders table on edit subscription screen when HPOS is active.
* Fix: On HPOS stores, make sure the links in the related-orders table redirect to the new Edit Order URL.
* Fix: When saving sync meta data on a new subscription, use 'woocommerce_new_subscription' instead of 'save_post'. This is to prevent errors when purchasing a subscription on stores that have HPOS enabled.
* Fix: When WooCommerce is network activated on multisites, don't show the "WooCommerce Subscriptions is inactive".
* Update: Improve maybe_add_subscription_meta() and subscription_contains_synced_product() inside our WC_Subscriptions_Synchroniser class to use CRUD methods.
* 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).
* Update: Replace instances of `get_posts()` across codebase with new wcs_get_orders_with_meta_query() function.
* Update: The subscription creation function `wcs_create_subscription` has been updated to use WooCommerce CRUD methods in preparation for supporting High Performance Order Storage (HPOS).
* Update: Improve wcs_copy_order_address() to use modern APIs for setting address fields.
* 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.
* Dev: Update subscriptions-core to 5.1.0
* Dev: Replace use of deprecated hook `wcs_renewal_order_meta_query` with `wc_subscriptions_renewal_order_data` in `WC_Subscriptions_Switcher`.
* Dev: Usage of \WC_Subscriptions_Core_Plugin::get_plugin_version() is no longer recommended for version detection. \WC_Subscriptions_Core_Plugin::get_library_version() should be used instead.
* Dev: Code that was tagged with a version and moved from WooCommerce Subscriptions now explicitly mentions this and shows the correct subscriptions-core and WC Subscriptions versions.
* Dev: Refactor the saving of subscription dates in the subscription datastore to separate fetching changes and saving. Enables backfilling subscription dates when HPOS syncing is enabled.
* Dev: Replace the use of the deprecated wcs_renewal_order_meta hook with wc_subscription_renewal_order_data in the WCS_Related_Order_Store_Cached_CPT class.
* Dev: wcs_get_objects_property and wcs_set_objects_property have been marked as deprecated. Getters/Setters should be used on the objects instead.
* Dev: Deprecated the "wcs_{type}_meta_query" dynamic hook used to alter the database query used to fetch the meta data to copy between subscriptions and renewal orders. There is no direct replacement. Third-parties should use the "wc_subscriptions_{type}_data" or "wc_subscriptions_object_data" hooks instead.
* Dev: Deprecated the "wcs_{type}_meta" dynamic hook used to filter data copied to subscriptions and renewal orders. Third-parties should use wc_subscriptions_{type}_data instead.
wcs_subscription_meta -> wc_subscriptions_subscription_data
wcs_parent_meta -> wc_subscriptions_parent_data
wcs_resubscribe_order_meta -> wc_subscriptions_resubscribe_order_data
wcs_renewal_order_meta -> wc_subscriptions_renewal_order_data
* Dev: woocommerce_new_subscription_data hook will only work with CPT datastore and so has been deprecated.
* Dev: i18n usage of strftime has been deprecated for subscription titles. Date is now formatted using woocommerce standard date formatting.
* Dev: Removes the legacy `woo-includes/` directory.
* Dev: Updated internal version references to the version of subscriptions-core.
* Dev: Bump minimum required version of WooCommerce to 6.0.
View the full WooCommerce Subscriptions Changelog
Get WooCommerce Subscriptions Version 4.7.0 with 12 months of updates for just $35!
Already a WPspring Club Member?
WooCommerce Subscriptions Version 4.7.0 Released on December 06, 2022, is now available from your account downloads page. Sign up at wpspri.ng/club