Automattic\WooCommerce\Internal\Admin
Loader::inject_before_notices()
Runs before admin notices action and hides them.
{} Это метод класса: Loader{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$result = Loader::inject_before_notices();
Код Loader::inject_before_notices() Loader::inject before notices WC 6.6.1
public static function inject_before_notices() { if ( ! PageController::is_admin_or_embed_page() ) { return; } // Wrap the notices in a hidden div to prevent flickering before // they are moved elsewhere in the page by WordPress Core. echo '<div class="woocommerce-layout__notice-list-hide" id="wp__notice-list">'; if ( PageController::is_admin_page() ) { // Capture all notices and hide them. WordPress Core looks for // `.wp-header-end` and appends notices after it if found. // https://github.com/WordPress/WordPress/blob/f6a37e7d39e2534d05b9e542045174498edfe536/wp-admin/js/common.js#L737 . echo '<div class="wp-header-end" id="woocommerce-layout__notice-catcher"></div>'; } }