diff --git a/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php b/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php index 668cf564fca..98ad8968cdd 100644 --- a/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php +++ b/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php @@ -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 . '-'; } diff --git a/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php b/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php index 73f95d19d6b..aba5a35a1af 100644 --- a/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php +++ b/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php @@ -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 ); } /**