WC_Helper::admin_notices() public WC 1.0
Various Helper-related admin notices.
{} Это метод класса: WC_Helper{}
Хуки из метода
Возвращает
Null. Ничего.
Использование
$result = WC_Helper::admin_notices();
Код WC_Helper::admin_notices() WC Helper::admin notices WC 5.0.0
public static function admin_notices() {
if ( apply_filters( 'woocommerce_helper_suppress_admin_notices', false ) ) {
return;
}
$screen = get_current_screen();
$screen_id = $screen ? $screen->id : '';
if ( 'update-core' !== $screen_id ) {
return;
}
// Don't nag if Woo doesn't have an update available.
if ( ! self::_woo_core_update_available() ) {
return;
}
// Add a note about available extension updates if Woo core has an update available.
$notice = self::_get_extensions_update_notice();
if ( ! empty( $notice ) ) {
echo '<div class="updated woocommerce-message"><p>' . $notice . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}