Last active
July 2, 2020 05:26
-
-
Save rynaldos-zz/29a6f764009eb992d47dfcb38badd79f to your computer and use it in GitHub Desktop.
Change Maxmind geolocation database path for WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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