WC_Integration_MaxMind_Geolocation::display_missing_license_key_notice()
Display notice if license key is missing.
Method of the class: WC_Integration_MaxMind_Geolocation{}
Hooks from the method
Return
null
. Nothing.
Usage
$WC_Integration_MaxMind_Geolocation = new WC_Integration_MaxMind_Geolocation(); $WC_Integration_MaxMind_Geolocation->display_missing_license_key_notice( $old_value, $new_value );
- $old_value(mixed) (required)
- Option old value.
- $new_value(mixed) (required)
- Current value.
WC_Integration_MaxMind_Geolocation::display_missing_license_key_notice() WC Integration MaxMind Geolocation::display missing license key notice code WC 7.5.1
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(); }