Automattic\WooCommerce\Admin\Features\ProductBlockEditor

BlockRegistry::maybe_log_removal_warningprivate staticWC 1.0

Log a warning about the removed compatibility class.

Method of the class: BlockRegistry{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = BlockRegistry::maybe_log_removal_warning(): void;

BlockRegistry::maybe_log_removal_warning() code WC 11.0.1

private static function maybe_log_removal_warning(): void {
	if ( self::$removal_warning_logged || ! function_exists( 'wc_get_logger' ) ) {
		return;
	}

	self::$removal_warning_logged = true;

	wc_get_logger()->warning(
		'Automattic\WooCommerce\Admin\Features\ProductBlockEditor\BlockRegistry is a temporary compatibility shim and will be removed soon. Product editor extension APIs were deprecated in WooCommerce 10.9.0, and the product block editor was removed in WooCommerce 11.0.0 with no replacement.',
		array( 'source' => 'product-block-editor' )
	);
}