From 947927eded3efeabf08a23d8be3ff555ab291cc4 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 19 Nov 2021 09:27:14 +0000 Subject: [PATCH] Add version to doing it wrong calls (https://github.com/woocommerce/woocommerce-blocks/pull/5134) --- plugins/woocommerce-blocks/src/BlockTypes/AbstractBlock.php | 2 +- .../src/Integrations/IntegrationRegistry.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/woocommerce-blocks/src/BlockTypes/AbstractBlock.php b/plugins/woocommerce-blocks/src/BlockTypes/AbstractBlock.php index f8dc6a77fd7..a5d9f4006bf 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/AbstractBlock.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/AbstractBlock.php @@ -107,7 +107,7 @@ abstract class AbstractBlock { */ protected function initialize() { if ( empty( $this->block_name ) ) { - _doing_it_wrong( __METHOD__, esc_html( __( 'Block name is required.', 'woo-gutenberg-products-block' ) ), '4.5.0' ); + _doing_it_wrong( __METHOD__, esc_html__( 'Block name is required.', 'woo-gutenberg-products-block' ), '4.5.0' ); return false; } $this->integration_registry->initialize( $this->block_name . '_block' ); diff --git a/plugins/woocommerce-blocks/src/Integrations/IntegrationRegistry.php b/plugins/woocommerce-blocks/src/Integrations/IntegrationRegistry.php index 8713c342c39..0d0d6e480a4 100644 --- a/plugins/woocommerce-blocks/src/Integrations/IntegrationRegistry.php +++ b/plugins/woocommerce-blocks/src/Integrations/IntegrationRegistry.php @@ -32,7 +32,7 @@ class IntegrationRegistry { } if ( empty( $this->registry_identifier ) ) { - _doing_it_wrong( __METHOD__, esc_html( __( 'Integration registry requires an identifier.', 'woo-gutenberg-products-block' ) ) ); + _doing_it_wrong( __METHOD__, esc_html__( 'Integration registry requires an identifier.', 'woo-gutenberg-products-block' ), '4.6.0' ); return false; } @@ -64,7 +64,7 @@ class IntegrationRegistry { if ( $this->is_registered( $name ) ) { /* translators: %s: Integration name. */ - _doing_it_wrong( __METHOD__, esc_html( sprintf( __( '"%s" is already registered.', 'woo-gutenberg-products-block' ), $name ) ) ); + _doing_it_wrong( __METHOD__, esc_html( sprintf( __( '"%s" is already registered.', 'woo-gutenberg-products-block' ), $name ) ), '4.6.0' ); return false; } @@ -95,7 +95,7 @@ class IntegrationRegistry { if ( ! $this->is_registered( $name ) ) { /* translators: %s: Integration name. */ - _doing_it_wrong( __METHOD__, esc_html( sprintf( __( 'Integration "%s" is not registered.', 'woo-gutenberg-products-block' ), $name ) ) ); + _doing_it_wrong( __METHOD__, esc_html( sprintf( __( 'Integration "%s" is not registered.', 'woo-gutenberg-products-block' ), $name ) ), '4.6.0' ); return false; }