Automattic\WooCommerce\Blocks\BlockTypes

AbstractBlock::is_block_editorprotectedWC 1.0

Are we currently on the admin block editor screen?

Method of the class: AbstractBlock{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->is_block_editor();

AbstractBlock::is_block_editor() code WC 9.8.5

protected function is_block_editor() {
	if ( ! is_admin() || ! function_exists( 'get_current_screen' ) ) {
		return false;
	}
	$screen = get_current_screen();

	return $screen && $screen->is_block_editor();
}