Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
Last active July 2, 2020 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rynaldos-zz/29a6f764009eb992d47dfcb38badd79f to your computer and use it in GitHub Desktop.
Save rynaldos-zz/29a6f764009eb992d47dfcb38badd79f to your computer and use it in GitHub Desktop.
Change Maxmind geolocation database path for WooCommerce
add_filter( 'woocommerce_maxmind_geolocation_database_path', 'woocommerce_new_maxmind_geolocation_database_path' );
function woocommerce_new_maxmind_geolocation_database_path( $database_path ) {
$upload_dir = wp_upload_dir();
$database_path = trailingslashit( $upload_dir['basedir'] ) . 'my-new-folder/dbfile.ext';
return $database_path;
}
// Did this help? Donate me some BTC: 1BEsm8VMkYhSFJ92cvUYwxCtsfsB2rBfiG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment