WC_Helper::admin_notices()public staticWC 1.0

Various Helper-related admin notices.

{} It's a method of the class: WC_Helper{}

Return

null. Nothing.

Usage

$result = WC_Helper::admin_notices();

Code of WC_Helper::admin_notices() WC 6.7.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
	}
}