Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit f4bce1c

Browse files
github-actions[bot]Matt Allan
andauthored
Version 7.7.2 (#737)
* Fixes notices being displayed on WordPress 6.7 due to loading translations too early. (#730) * Remove unnecessary call to check if feature exists - fixes WP 6.7 compat * Fix early translation calls in our privacy exporter/eraser class * Register caching debug tools after init to fix translation issues * Add changelog entry * Update release PR workflow to use the selected branch instead of always using trunk * Version 7.7.2 --------- Co-authored-by: Matt Allan <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 07bf070 commit f4bce1c

10 files changed

+34
-12
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Check out the woocommerce-subscriptions-core repository
1313
uses: actions/checkout@v3
1414
with:
15-
ref: trunk
15+
ref: ${{ github.ref }}
1616
path: main
1717

1818
- name: Check out the woorelease repository

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
*** WooCommerce Subscriptions Core Changelog ***
22

3+
= 7.7.2 - 2024-11-26 =
4+
* Fix - Prevents notices being displayed on WordPress 6.7 due to loading translations too early.
5+
36
= 7.7.1 - 2024-11-13 =
47
* Fix - Only show the individual subscription information in customer notification emails, not all subscriptions purchased in the initial order.
58
* Fix - Resolved issues with Customer Notification emails not being sent due to unsupported emoji used in the default email subject.

includes/class-wc-subscriptions-core-plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class WC_Subscriptions_Core_Plugin {
1616
* The version of subscriptions-core library.
1717
* @var string
1818
*/
19-
protected $library_version = '7.7.1'; // WRCS: DEFINED_VERSION.
19+
protected $library_version = '7.7.2'; // WRCS: DEFINED_VERSION.
2020

2121
/**
2222
* The subscription scheduler instance.

includes/data-stores/class-wcs-customer-store-cached-cpt.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ protected function init() {
7070

7171
$this->object_data_cache_manager->init();
7272

73+
add_action( 'init', array( $this, 'register_debug_tools' ) );
74+
7375
// When a user is first added, make sure the subscription cache is empty because it can not have any data yet, and we want to avoid running the query needlessly
7476
add_filter( 'user_register', array( $this, 'set_empty_cache' ) );
7577

7678
// When the post for a subscription is change, make sure the corresponding cache is updated
7779
add_action( 'wcs_update_post_meta_caches', array( $this, 'maybe_update_for_post_meta_change' ), 10, 5 );
7880
add_action( 'wcs_delete_all_post_meta_caches', array( $this, 'maybe_delete_all_for_post_meta_change' ), 10, 1 );
81+
}
7982

83+
/**
84+
* Register debug tools for managing the cache.
85+
*/
86+
public function register_debug_tools() {
8087
WCS_Debug_Tool_Factory::add_cache_tool( 'generator', __( 'Generate Customer Subscription Cache', 'woocommerce-subscriptions' ), __( 'This will generate the persistent cache for linking users with subscriptions. The caches will be generated overtime in the background (via Action Scheduler).', 'woocommerce-subscriptions' ), self::instance() );
8188
WCS_Debug_Tool_Factory::add_cache_tool( 'eraser', __( 'Delete Customer Subscription Cache', 'woocommerce-subscriptions' ), __( 'This will clear the persistent cache of all of subscriptions stored against users in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as queries to find a given user\'s subscriptions are run.', 'woocommerce-subscriptions' ), self::instance() );
8289
}

includes/data-stores/class-wcs-related-order-store-cached-cpt.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ protected function init() {
9292

9393
$this->object_data_cache_manager->init();
9494

95+
add_action( 'init', array( $this, 'register_debug_tools' ) );
96+
9597
// When a subscription is being read from the database, don't load cached related order meta data into subscriptions.
9698
add_filter( 'wcs_subscription_data_store_props_to_ignore', array( $this, 'add_related_order_cache_props' ), 10, 2 );
9799

@@ -104,7 +106,12 @@ protected function init() {
104106

105107
// When copying meta from a subscription to a renewal order, don't copy cache related order meta keys.
106108
add_filter( 'wc_subscriptions_renewal_order_data', array( $this, 'remove_related_order_cache_keys' ), 10, 1 );
109+
}
107110

111+
/**
112+
* Register debug tools for managing the cache.
113+
*/
114+
public function register_debug_tools() {
108115
WCS_Debug_Tool_Factory::add_cache_tool( 'generator', __( 'Generate Related Order Cache', 'woocommerce-subscriptions' ), __( 'This will generate the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. The caches will be generated overtime in the background (via Action Scheduler).', 'woocommerce-subscriptions' ), self::instance() );
109116
WCS_Debug_Tool_Factory::add_cache_tool( 'eraser', __( 'Delete Related Order Cache', 'woocommerce-subscriptions' ), __( 'This will clear the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as related order queries are run.', 'woocommerce-subscriptions' ), self::instance() );
110117
}

includes/privacy/class-wcs-privacy.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,16 @@ public function __construct() {
3737
self::$background_process = new WCS_Privacy_Background_Updater();
3838
}
3939

40-
parent::__construct( __( 'WooCommerce Subscriptions', 'woocommerce-subscriptions' ) );
40+
parent::__construct();
41+
42+
add_action( 'init', array( $this, 'register_erasers_exporters' ) );
43+
}
44+
45+
/**
46+
* Register erasers and exporters.
47+
*/
48+
public function register_erasers_exporters() {
49+
$this->name = __( 'WooCommerce Subscriptions', 'woocommerce-subscriptions' );
4150

4251
// Add our exporters and erasers.
4352
$this->add_exporter( 'woocommerce-subscriptions-data', __( 'Subscriptions Data', 'woocommerce-subscriptions' ), array( 'WCS_Privacy_Exporters', 'subscription_data_exporter' ) );

includes/wcs-compatibility-functions.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -603,11 +603,7 @@ function wcs_is_wc_feature_enabled( $feature_name ) {
603603
* @return bool
604604
*/
605605
function wcs_is_custom_order_tables_usage_enabled() {
606-
if ( ! class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) || ! wcs_is_wc_feature_enabled( 'custom_order_tables' ) ) {
607-
return false;
608-
}
609-
610-
return \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled();
606+
return class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) && \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled();
611607
}
612608

613609
/**

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "WooCommerce Subscriptions Core",
44
"author": "Automattic",
55
"license": "GPL-3.0-or-later",
6-
"version": "7.7.1",
6+
"version": "7.7.2",
77
"description": "",
88
"homepage": "https://github.com/Automattic/woocommerce-subscriptions-core",
99
"main": "Gruntfile.js",

woocommerce-subscriptions-core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
* Author: Automattic
77
* Author URI: https://woocommerce.com/
88
* Requires WP: 5.6
9-
* Version: 7.7.1
9+
* Version: 7.7.2
1010
*/

0 commit comments

Comments
 (0)