woocommerce_maxmind_geolocation_display_notices

woocommerce_maxmind_geolocation_display_notices

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_maxmind_geolocation_display_notices') is found 2 times:

  • /includes/admin/class-wc-admin-notices.php line 606
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    * @since 3.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;
        }
  • /includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php line 279
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    * @param mixed $old_value Option old value.
     * @param mixed $new_value Current value.
     */
    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;