woocommerce_geolocation_local_database_path filter-hook . WC 1.0
Make sure to use all of the correct filters to pull the local database path.
Usage
add_filter( 'woocommerce_geolocation_local_database_path', 'filter_function_name_3356', 10, 2 ); function filter_function_name_3356( $WP_CONTENT_DIR /uploads/GeoLite2-Countrymmdb, $2 ){ // filter... return $WP_CONTENT_DIR /uploads/GeoLite2-Countrymmdb; }
- $WP_CONTENT_DIR /uploads/GeoLite2-Countrymmdb
- -
- $2
- -
Where the hook is called
woocommerce_geolocation_local_database_path
woocommerce_geolocation_local_database_path
woocommerce/includes/wc-update-functions.php 2076
$old_path = apply_filters( 'woocommerce_geolocation_local_database_path', WP_CONTENT_DIR . '/uploads/GeoLite2-Country.mmdb', 2 );
woocommerce/includes/wc-update-functions.php 2085
$new_path = apply_filters( 'woocommerce_geolocation_local_database_path', $new_path, 2 );
woocommerce/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php 65-70
$database_path = apply_filters_deprecated( 'woocommerce_geolocation_local_database_path', array( $database_path, 2 ), '3.9.0', 'woocommerce_maxmind_geolocation_database_path' );