Automattic\WooCommerce\Admin\Features\ProductBlockEditor

RedirectionController::__constructpublicWC 1.0

Set up the hooks used for redirection.

Method of the class: RedirectionController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$RedirectionController = new RedirectionController();
$RedirectionController->__construct();

RedirectionController::__construct() code WC 10.6.2

public function __construct() {
	if ( \Automattic\WooCommerce\Utilities\FeaturesUtil::feature_is_enabled( 'product_block_editor' ) ) {
		add_action( 'current_screen', array( $this, 'maybe_redirect_to_new_editor' ), 30, 0 );
		add_action( 'current_screen', array( $this, 'redirect_non_supported_product_types' ), 30, 0 );
	} else {
		add_action( 'current_screen', array( $this, 'maybe_redirect_to_old_editor' ), 30, 0 );
	}
}