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.8.7.0

apply_filters('woocommerce_maxmind_geolocation_database_path') is found 2 times:

  • /includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php line 78
    		 *
    		 * @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 2075
    	// 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 );
    }
    
    /**