WC_Admin_Notices::maxmind_missing_license_key_notice()public staticWC 3.9.0

Display MaxMind missing license key notice.

Method of the class: WC_Admin_Notices{}

Return

null. Nothing (null).

Usage

$result = WC_Admin_Notices::maxmind_missing_license_key_notice();

Changelog

Since 3.9.0 Introduced.

WC_Admin_Notices::maxmind_missing_license_key_notice() code WC 8.9.0

public static function maxmind_missing_license_key_notice() {
	$user_dismissed_notice   = get_user_meta( get_current_user_id(), 'dismissed_maxmind_license_key_notice', true );
	$filter_dismissed_notice = ! apply_filters( 'woocommerce_maxmind_geolocation_display_notices', true );

	if ( $user_dismissed_notice || $filter_dismissed_notice ) {
		self::remove_notice( 'maxmind_license_key' );
		return;
	}

	include __DIR__ . '/views/html-notice-maxmind-license-key.php';
}