WC_Integration_MaxMind_Geolocation::display_missing_license_key_notice( mixed $old_value, mixed $new_value )
Display notice if license key is missing.
Description Description
Parameters Parameters
- $old_value
-
(Required) Option old value.
- $new_value
-
(Required) Current value.
Source Source
File: includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php
public function display_missing_license_key_notice( $old_value, $new_value ) {
if ( ! apply_filters( 'woocommerce_maxmind_geolocation_display_notices', true ) ) {
return;
}
if ( ! in_array( $new_value, array( 'geolocation', 'geolocation_ajax' ), true ) ) {
$this->remove_missing_license_key_notice();
return;
}
$license_key = $this->get_option( 'license_key' );
if ( ! empty( $license_key ) ) {
return;
}
$this->add_missing_license_key_notice();
}