Commit 9603d49160a for woocommerce
commit 9603d49160ab9d74266cea9637d31628df302a3c
Author: Asim Sulehria <de.asimhabib@gmail.com>
Date: Tue May 5 21:03:15 2026 +0500
Rename is_overriden_by_custom_template_content method (with deprecated BC wrapper) (#64461)
* Fix typo in CartCheckoutUtils method name (overriden -> overridden)
* Add backward compat deprecated shim for is_overriden_by_custom_template_content
* Add wc_deprecated_function notice to is_overriden_by_custom_template_content()
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
Co-authored-by: Brandon Kraft <public@brandonkraft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
diff --git a/plugins/woocommerce/changelog/64461-rename-is-overridden-by-custom-template-content b/plugins/woocommerce/changelog/64461-rename-is-overridden-by-custom-template-content
new file mode 100644
index 00000000000..b3710318dc4
--- /dev/null
+++ b/plugins/woocommerce/changelog/64461-rename-is-overridden-by-custom-template-content
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Rename CartCheckoutUtils::is_overriden_by_custom_template_content() to is_overridden_by_custom_template_content(). The misspelled name is preserved as a deprecated alias for backwards compatibility.
diff --git a/plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php b/plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php
index 25963515448..5c99761c603 100644
--- a/plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php
+++ b/plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php
@@ -905,7 +905,7 @@ if ( 0 < $mu_plugins_count ) :
if ( ! empty( $_page['shortcode'] ) || ! empty( $_page['block'] ) ) {
// We check first if, in a blocks theme, the template content does not load the page content.
- if ( CartCheckoutUtils::is_overriden_by_custom_template_content( $_page['block'] ) ) {
+ if ( CartCheckoutUtils::is_overridden_by_custom_template_content( $_page['block'] ) ) {
$additional_info = __( "This page's content is overridden by custom template content", 'woocommerce' );
} elseif ( $_page['shortcode_present'] ) {
// Always display the shortcode with square brackets for consistency.
diff --git a/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php b/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php
index c8f14db8dba..0dc74298b08 100644
--- a/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php
+++ b/plugins/woocommerce/src/Blocks/Utils/CartCheckoutUtils.php
@@ -305,11 +305,13 @@ class CartCheckoutUtils {
* Checks if the template overriding the page loads the page content or not.
* Templates by default load the page content, but if that block is deleted the content can get out of sync with the one presented in the page editor.
*
+ * @since 10.9.0
+ *
* @param string $block The block to check.
*
* @return bool true if the template has out of sync content.
*/
- public static function is_overriden_by_custom_template_content( string $block ): bool {
+ public static function is_overridden_by_custom_template_content( string $block ): bool {
$block = str_replace( 'woocommerce/', '', $block );
@@ -326,6 +328,21 @@ class CartCheckoutUtils {
return false;
}
+ /**
+ * Checks if the template overriding the page loads the page content or not.
+ * Templates by default load the page content, but if that block is deleted the content can get out of sync with the one presented in the page editor.
+ *
+ * @deprecated 10.9.0 Use is_overridden_by_custom_template_content() instead.
+ *
+ * @param string $block The block to check.
+ *
+ * @return bool true if the template has out of sync content.
+ */
+ public static function is_overriden_by_custom_template_content( string $block ): bool {
+ wc_deprecated_function( __METHOD__, '10.9.0', 'is_overridden_by_custom_template_content' );
+ return self::is_overridden_by_custom_template_content( $block );
+ }
+
/**
* Gets country codes, names, states, and locale information.
*