WordPress at Your Fingertips
function is not described

WC_Admin_Notices::add_maxmind_missing_license_key_notice() public WC 3.9.0

Add MaxMind missing license key notice.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Notices::add_maxmind_missing_license_key_notice();

Changelog

Since 3.9.0 Introduced.

Code of WC_Admin_Notices::add_maxmind_missing_license_key_notice() WC 5.9.0

public static function add_maxmind_missing_license_key_notice() {
	$default_address = get_option( 'woocommerce_default_customer_address' );

	if ( ! in_array( $default_address, array( 'geolocation', 'geolocation_ajax' ), true ) ) {
		return;
	}

	$integration_options = get_option( 'woocommerce_maxmind_geolocation_settings' );
	if ( empty( $integration_options['license_key'] ) ) {
		self::add_notice( 'maxmind_license_key' );

	}
}