Automattic\WooCommerce\Admin\Features\ProductBlockEditor

BlockRegistry::is_registered()publicWC 1.0

Check if a block is registered.

Method of the class: BlockRegistry{}

No Hooks.

Return

null. Nothing (null).

Usage

$BlockRegistry = new BlockRegistry();
$BlockRegistry->is_registered( $block_name ): bool;
$block_name(string) (required)
Block name.

BlockRegistry::is_registered() code WC 9.2.3

public function is_registered( $block_name ): bool {
	$registry = \WP_Block_Type_Registry::get_instance();

	return $registry->is_registered( $block_name );
}