WordPress at Your Fingertips
function is not described

should_display_compatibility_notices() WC 2.5.0

Whether notices must be displayed in the current page (plugins and WooCommerce pages).

No Hooks.

Return

null. Nothing.

Usage

should_display_compatibility_notices();

Changelog

Since 2.5.0 Introduced.

Code of should_display_compatibility_notices() WC 5.8.0

function should_display_compatibility_notices() {
	$current_screen = get_current_screen();

	if ( ! isset( $current_screen ) ) {
		return false;
	}

	$is_plugins_page     =
		property_exists( $current_screen, 'id' ) &&
		'plugins' === $current_screen->id;
	$is_woocommerce_page =
		property_exists( $current_screen, 'parent_base' ) &&
		'woocommerce' === $current_screen->parent_base;

	return $is_plugins_page || $is_woocommerce_page;
}