Moved the database file into the woocommerce_uploads folder

This commit is contained in:
Christopher Allford 2020-01-13 08:53:43 -08:00
parent 645affb7f3
commit 6d3a3053c5
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ class WC_Integration_MaxMind_Database_Service {
* @return string The local database path.
*/
public function get_database_path() {
$database_path = WP_CONTENT_DIR . '/uploads/';
$database_path = WP_CONTENT_DIR . '/uploads/woocommerce_uploads/';
if ( ! empty( $this->database_prefix ) ) {
$database_path .= $this->database_prefix . '-';
}

View File

@ -29,7 +29,7 @@ class WC_Tests_MaxMind_Database extends WC_Unit_Test_Case {
$database_service = new WC_Integration_MaxMind_Database_Service( '' );
$path = $database_service->get_database_path();
$this->assertEquals( WP_CONTENT_DIR . '/uploads/' . WC_Integration_MaxMind_Database_Service::DATABASE . WC_Integration_MaxMind_Database_Service::DATABASE_EXTENSION, $path );
$this->assertEquals( WP_CONTENT_DIR . '/uploads/woocommerce_uploads/' . WC_Integration_MaxMind_Database_Service::DATABASE . WC_Integration_MaxMind_Database_Service::DATABASE_EXTENSION, $path );
add_filter( 'woocommerce_geolocation_local_database_path', array( $this, 'filter_database_path_deprecated' ), 1, 2 );
$path = $database_service->get_database_path();
@ -47,7 +47,7 @@ class WC_Tests_MaxMind_Database extends WC_Unit_Test_Case {
$database_service = new WC_Integration_MaxMind_Database_Service( 'testing' );
$path = $database_service->get_database_path();
$this->assertEquals( WP_CONTENT_DIR . '/uploads/testing-' . WC_Integration_MaxMind_Database_Service::DATABASE . WC_Integration_MaxMind_Database_Service::DATABASE_EXTENSION, $path );
$this->assertEquals( WP_CONTENT_DIR . '/uploads/woocommerce_uploads/testing-' . WC_Integration_MaxMind_Database_Service::DATABASE . WC_Integration_MaxMind_Database_Service::DATABASE_EXTENSION, $path );
}
/**