Commit 0ee9ba90452 for woocommerce
commit 0ee9ba90452cd8e872395780874feda044ce5b8f
Author: Cvetan Cvetanov <cvetan.cvetanov@automattic.com>
Date: Mon Jun 8 21:51:38 2026 +0300
Move inline comment off statement line in wc_customer_bought_product (PHPCS) (#65586)
style: move inline comment off statement line in wc_customer_bought_product
PHPCS (Squiz.Commenting.PostStatementComment) flags the inline comment on
the `$aggregation_version` assignment in wc_customer_bought_product(). The
error surfaced in the release/10.9 branch lint after the v2->v3 cache
version bump (#65517) pulled that line into the changed-lines diff; the
style issue itself predates it (#63995). Move the comment to its own line.
No functional change.
Refs #65517
diff --git a/plugins/woocommerce/changelog/fix-phpcs-poststatement-wc-user-functions b/plugins/woocommerce/changelog/fix-phpcs-poststatement-wc-user-functions
new file mode 100644
index 00000000000..3e5976d90db
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-phpcs-poststatement-wc-user-functions
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Move an inline comment to its own line in wc_customer_bought_product() to satisfy PHPCS (no functional change).
diff --git a/plugins/woocommerce/includes/wc-user-functions.php b/plugins/woocommerce/includes/wc-user-functions.php
index 544271723bb..289e74f09db 100644
--- a/plugins/woocommerce/includes/wc-user-functions.php
+++ b/plugins/woocommerce/includes/wc-user-functions.php
@@ -439,7 +439,8 @@ function wc_customer_bought_product( $customer_email, $user_id, $product_id ) {
$cache_version = WC_Cache_Helper::get_transient_version( 'orders' );
}
- $aggregation_version = 'v3'; // Update the version when modifying the aggregation implementation to ensure the cache is repopulated.
+ // Update the version when modifying the aggregation implementation to ensure the cache is repopulated.
+ $aggregation_version = 'v3';
$cache_group = 'orders';
$cache_key = 'wc_customer_bought_product_' . md5( $customer_email . '-' . $user_id . '-' . $use_lookup_tables . '-' . $aggregation_version );
$cache_value = wp_cache_get( $cache_key, $cache_group );