Automattic\WooCommerce\Admin\Features\ProductBlockEditor
RedirectionController::redirect_non_supported_product_types()
Redirect non supported product types to legacy editor.
Метод класса: RedirectionController{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$RedirectionController = new RedirectionController(); $RedirectionController->redirect_non_supported_product_types(): void;
Код RedirectionController::redirect_non_supported_product_types() RedirectionController::redirect non supported product types WC 9.7.1
public function redirect_non_supported_product_types(): void { $route = $this->get_parsed_route(); $product_id = $route['product_id']; if ( 'product' === $route['page'] && ! $this->is_product_supported( $product_id ) ) { wp_safe_redirect( admin_url( 'post.php?post=' . $route['product_id'] . '&action=edit' ) ); exit(); } }