Commit f182a5defe3 for woocommerce
commit f182a5defe3fced4143d2e12a06cfbe99790c57b
Author: Brandon Kraft <public@brandonkraft.com>
Date: Mon May 25 04:34:43 2026 -0500
Fix typos in PHP comments, docblocks, and one test method name (combined from asimsolehria contributions) (#64601)
Fix typos in PHP comments, docblocks, and one test method name
Combines typo-only fixes from PRs by asimsolehria into a single PR for ease of review:
- woocommerce/woocommerce#64580 — Dont' → Don't (WC_Admin_Meta_Boxes)
- woocommerce/woocommerce#64579 — dont → don't (BlockHooksTrait)
- woocommerce/woocommerce#64578 — feautre → feature (FeaturePluginCompatibility)
- woocommerce/woocommerce#64577 — orignally → originally (CartCheckoutUtils)
- woocommerce/woocommerce#64463 — overriden → overridden (test method name and a test comment)
- woocommerce/woocommerce#64434 — assignements → assignments (5 Reports DataStore todo comments)
No behavior changes; comments, docblocks, and one PHPUnit test method name only.
Co-authored-by: Asim Sulehria <de.asimhabib@gmail.com>
diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php b/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php
index e7c81374dba..2ba78fd12f9 100644
--- a/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php
+++ b/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php
@@ -219,7 +219,7 @@ class WC_Admin_Meta_Boxes {
return;
}
- // Dont' save meta boxes for revisions or autosaves.
+ // Don't save meta boxes for revisions or autosaves.
if ( Constants::is_true( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) {
return;
}
diff --git a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/DataStore.php
index f8ab7562e40..27720d97a35 100644
--- a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/DataStore.php
+++ b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/DataStore.php
@@ -178,7 +178,7 @@ class DataStore extends CouponsDataStore implements DataStoreInterface {
}
// phpcs:ignore Generic.Commenting.Todo.TaskFound
- // @todo remove these assignements when refactoring segmenter classes to use query objects.
+ // @todo remove these assignments when refactoring segmenter classes to use query objects.
$totals_query = array(
'from_clause' => $this->total_query->get_sql_clause( 'join' ),
'where_time_clause' => $this->total_query->get_sql_clause( 'where_time' ),
diff --git a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php
index c532501ef37..72a4c7fac1d 100644
--- a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php
+++ b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php
@@ -377,7 +377,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
}
// phpcs:ignore Generic.Commenting.Todo.TaskFound
- // @todo Remove these assignements when refactoring segmenter classes to use query objects.
+ // @todo Remove these assignments when refactoring segmenter classes to use query objects.
$totals_query = array(
'from_clause' => $this->total_query->get_sql_clause( 'join' ),
'where_time_clause' => $where_time,
diff --git a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php
index 23fe869dbfb..efb32aad752 100644
--- a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php
+++ b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php
@@ -184,7 +184,7 @@ class DataStore extends ProductsDataStore implements DataStoreInterface {
);
// phpcs:ignore Generic.Commenting.Todo.TaskFound
- // @todo remove these assignements when refactoring segmenter classes to use query objects.
+ // @todo remove these assignments when refactoring segmenter classes to use query objects.
$totals_query = array(
'from_clause' => $this->total_query->get_sql_clause( 'join' ),
'where_time_clause' => $this->total_query->get_sql_clause( 'where_time' ),
diff --git a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php
index 3e124ad2396..a187b8a2718 100644
--- a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php
+++ b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php
@@ -200,7 +200,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
}
// phpcs:ignore Generic.Commenting.Todo.TaskFound
- // @todo remove these assignements when refactoring segmenter classes to use query objects.
+ // @todo remove these assignments when refactoring segmenter classes to use query objects.
$totals_query = array(
'from_clause' => $this->total_query->get_sql_clause( 'join' ),
'where_time_clause' => $this->total_query->get_sql_clause( 'where_time' ),
diff --git a/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php
index 7ddfd78177b..d277f341ccd 100644
--- a/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php
+++ b/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php
@@ -206,7 +206,7 @@ class DataStore extends VariationsDataStore implements DataStoreInterface {
/* phpcs:enable */
// phpcs:ignore Generic.Commenting.Todo.TaskFound
- // @todo remove these assignements when refactoring segmenter classes to use query objects.
+ // @todo remove these assignments when refactoring segmenter classes to use query objects.
$totals_query = array(
'from_clause' => $this->total_query->get_sql_clause( 'join' ),
'where_time_clause' => $this->total_query->get_sql_clause( 'where_time' ),
diff --git a/plugins/woocommerce/src/Blocks/Utils/BlockHooksTrait.php b/plugins/woocommerce/src/Blocks/Utils/BlockHooksTrait.php
index 2bbc2a89637..895222730fb 100644
--- a/plugins/woocommerce/src/Blocks/Utils/BlockHooksTrait.php
+++ b/plugins/woocommerce/src/Blocks/Utils/BlockHooksTrait.php
@@ -161,7 +161,7 @@ trait BlockHooksTrait {
$pattern_slug = is_array( $context ) && isset( $context['slug'] ) ? $context['slug'] : '';
if ( ! $pattern_slug ) {
/**
- * Woo patterns have a slug property in $context, but core/theme patterns dont.
+ * Woo patterns have a slug property in $context, but core/theme patterns don't.
* In that case, we fallback to the name property, as they're the same.
*/
$pattern_slug = is_array( $context ) && isset( $context['name'] ) ? $context['name'] : '';
diff --git a/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php b/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php
index 0dc74298b08..eeacb67418e 100644
--- a/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php
+++ b/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php
@@ -185,7 +185,7 @@ class CartCheckoutUtils {
* Migrate checkout block field visibility attributes to settings when using the checkout block.
*
* This migration routine is called if the options (woocommerce_checkout_phone_field, woocommerce_checkout_company_field,
- * woocommerce_checkout_address_2_field) are not set. They are not set by default; they were orignally set by the
+ * woocommerce_checkout_address_2_field) are not set. They are not set by default; they were originally set by the
* customizer interface of the legacy shortcode based checkout.
*
* Once migration is initiated, the settings will be updated and will not trigger this routine again.
diff --git a/plugins/woocommerce/src/Enums/FeaturePluginCompatibility.php b/plugins/woocommerce/src/Enums/FeaturePluginCompatibility.php
index fcf6d6e9b56..6eb5af5187c 100644
--- a/plugins/woocommerce/src/Enums/FeaturePluginCompatibility.php
+++ b/plugins/woocommerce/src/Enums/FeaturePluginCompatibility.php
@@ -23,7 +23,7 @@ final class FeaturePluginCompatibility {
public const INCOMPATIBLE = 'incompatible';
/**
- * Plugin compatibility with the feautre is yet to be determined. Internal use only.
+ * Plugin compatibility with the feature is yet to be determined. Internal use only.
*
* @internal
* @var string
diff --git a/plugins/woocommerce/tests/legacy/unit-tests/order-items/class-wc-tests-order-item.php b/plugins/woocommerce/tests/legacy/unit-tests/order-items/class-wc-tests-order-item.php
index 0563a531bba..2fac5b8250b 100644
--- a/plugins/woocommerce/tests/legacy/unit-tests/order-items/class-wc-tests-order-item.php
+++ b/plugins/woocommerce/tests/legacy/unit-tests/order-items/class-wc-tests-order-item.php
@@ -101,7 +101,7 @@ class WC_Tests_Base_Order_Item extends WC_Unit_Test_Case {
/**
* @testdox 'calculate_cogs_value' sets the value returned by the 'calculate_cogs_core' override, and returns true.
*/
- public function test_calculate_cogs_sets_value_from_core_calculation_overriden_in_child_class() {
+ public function test_calculate_cogs_sets_value_from_core_calculation_overridden_in_child_class() {
$this->sut->has_cogs_value = true;
$this->enable_cogs_feature();