WC_Helper::admin_notices()
Various Helper-related admin notices.
Method of the class: WC_Helper{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$result = WC_Helper::admin_notices();
WC_Helper::admin_notices() WC Helper::admin notices code WC 9.3.3
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 } }