woocommerce_maxmind_geolocation_database_path

woocommerce_maxmind_geolocation_database_path

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

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_maxmind_geolocation_database_path') is found 2 times:

  • /includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php line 78
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
         *
         * @since 3.9.0
         * @param string $database_path The path to the database.
         */
        return apply_filters( 'woocommerce_maxmind_geolocation_database_path', $database_path );
    }
     
    /**
     * Fetches the database from the MaxMind service.
     *
     * @param string $license_key The license key to be used when downloading the database.
  • /includes/wc-update-functions.php line 2083
    2079
    2080
    2081
    2082
    2083
    2084
    2085
    2086
    2087
    2088
    2089
        // Generate the new path in the same way that the integration will.
        $uploads_dir = wp_upload_dir();
        $new_path    = trailingslashit( $uploads_dir['basedir'] ) . 'woocommerce_uploads/' . $prefix . '-GeoLite2-Country.mmdb';
        $new_path    = apply_filters( 'woocommerce_geolocation_local_database_path', $new_path, 2 );
        $new_path    = apply_filters( 'woocommerce_maxmind_geolocation_database_path', $new_path );
     
        // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
        @rename( $old_path, $new_path );
    }
     
    /**