Commit Graph

36166 Commits

Author SHA1 Message Date
Rodrigo Primo 9e6bfc7051
Merge pull request #25282 from woocommerce/renovate/commander-4.x
Update dependency commander to v4
2020-01-16 14:50:55 -03:00
Renovate Bot f81afa0794
Update dependency phpunit/phpunit to v7.5.20 2020-01-16 00:58:45 +00:00
Claudio Sanches 7d03c6bcdb
Merge pull request #25412 from woocommerce/update/3.9.0-rc.3
Version 3.9.0-rc.3
2020-01-15 21:18:49 -03:00
Claudio Sanches 28718614d7 Version 3.9.0-rc.3 2020-01-15 21:17:57 -03:00
Claudio Sanches bccb93fa3c
Merge pull request #25378 from woocommerce/fix/25361
Add license key support to MaxMind GeoLite2 database downloads
2020-01-15 20:51:14 -03:00
Claudio Sanches eedf82da38 Fixed coding standards 2020-01-15 20:40:55 -03:00
Claudio Sanches 78ccf4d4c6 Version 1.0.6 2020-01-15 20:29:39 -03:00
Siriwat Uamngamsup 43b9f9f07d Fixed wrong route path for shipping zone api 2020-01-15 20:26:38 -03:00
Claudio Sanches ea36caf17e Removed MaxMind from System Status 2020-01-15 20:26:12 -03:00
Rodrigo Primo e325eafc9a Remove image after unit tests to make sure they pass on Travis
The test
WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_download_image_and_return_array()
was failing on Travis with the error below due images being kept on
accros different tests. To fix this problem, this commit makes sure that
every test that creates an image, removes it after the assertions.

```
1) WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_download_image_and_return_array

Failed asserting that two arrays are equal.

--- Expected
+++ Actual

@@ @@

 Array (
-    'file' => '/tmp/wordpress/wp-content/uploads/2020/01/Dr1Bczxq4q.png'
-    'url' => 'http://example.org/wp-content/uploads/2020/01/Dr1Bczxq4q.png'
+    'file' => '/tmp/wordpress/wp-content/uploads/2020/01/Dr1Bczxq4q-3.png'
+    'url' => 'http://example.org/wp-content/uploads/2020/01/Dr1Bczxq4q-3.png'

/home/travis/build/woocommerce/woocommerce-rest-api/unit-tests/Tests/Version3/functions.php:113
```

(https://travis-ci.org/woocommerce/woocommerce-rest-api/jobs/634921426#L719)
2020-01-15 20:25:02 -03:00
Rodrigo Primo 10f55dbff4 Fix unit test suite in the Travis build jobs
This commit fixes a problem in the script that configures the
environment to run the unit tests in the Travis build jobs. The script
was not running `composer install` in the WooCommerce directory, leaving
it installation incomplete and thus the tests were failing.

To fix this problem, this commit adds a call to `composer install` right
after WooCommerce is downloaded in the setup script
(`unit-tests/bin/install.sh`).
2020-01-15 20:22:29 -03:00
Claudio Sanches 4ea0e73909 Fixed logic and removed old variable 2020-01-15 20:21:25 -03:00
Claudio Sanches c55b49194b Fixed coding standards 2020-01-15 20:21:25 -03:00
Claudio Sanches d133875e5d Keep backwards compatibility 2020-01-15 20:21:25 -03:00
Claudio Sanches 06ec2fd9c6 Set correct type 2020-01-15 20:21:25 -03:00
Claudio Sanches 19b7e278ac Fixed schema 2020-01-15 20:21:25 -03:00
Claudio Sanches 7eded142c7 Remove extra loop 2020-01-15 20:21:25 -03:00
Rodrigo Primo 64f09329dd Add unit test to test filtering by field when getting system status 2020-01-15 20:21:25 -03:00
Rodrigo Primo 0cfbc27a27 Simplify and speedup WC_Tests_REST_System_Status tests
This implements two changes to WC_Tests_REST_System_Status test class:

- It simplifies the tests by setting the user in the setUp method
instead of in each test.
- Improves the performance of the tests by creating a new admin user
only once when the class is instantiated instead of once for every
single test that is executed.
2020-01-15 20:21:25 -03:00
Claudio Sanches bc0acf60b8 Improved logic to only try remote requests if necessary 2020-01-15 20:21:25 -03:00
Claudio Sanches 4342ae2b6f Prevent wp_remote_post or wp_remote_get to trigger when not necessary 2020-01-15 20:21:25 -03:00
Claudio Sanches b4125269a3 Updated WC_REST_Controller::get_fields_for_response() 2020-01-15 20:21:25 -03:00
Claudio Sanches 361326d7f0 Fixed type numeric type on products and variations schema 2020-01-15 20:18:20 -03:00
Claudio Sanches b8763fd3e4 Added unit tests for instance_id 2020-01-15 20:17:36 -03:00
Claudio Sanches ae9948edef Allow set instance_id for Order's shipping_lines 2020-01-15 20:17:19 -03:00
Claudio Sanches d139b35344 Test the correct orders endpoint 2020-01-15 20:16:11 -03:00
Christopher Allford e56e5dfc50 Pushed the first woocommerce_geoip_updater execution to fifteen days in the future
This will prevent the routine from deleting the pre-update archive that we just moved in the previous update routine.
2020-01-15 10:25:51 -08:00
Christopher Allford 2b503e0409 Changed the MaxMind database update process to move the existing archive instead of deleting it 2020-01-15 10:24:13 -08:00
Claudio Sanches ee30dbbcf7
Merge pull request #25369 from woocommerce/renovate/husky-4.x
Update dependency husky to v4
2020-01-15 14:13:29 -03:00
Claudio Sanches b3edca585d
Merge pull request #25324 from woocommerce/dependabot/npm_and_yarn/handlebars-4.5.3
Bump handlebars from 4.1.2 to 4.5.3
2020-01-15 14:12:59 -03:00
Claudio Sanches d9c22d60be Use wp_mail() default args in WC_Email 2020-01-15 13:33:12 -03:00
Renovate Bot 875c7f341b
Update dependency husky to v4 2020-01-15 15:07:53 +00:00
Claudio Sanches cf7864b91c
Merge pull request #25403 from woocommerce/fix-unit-test
Fix failing unit test due to change in WP nightly
2020-01-15 11:59:10 -03:00
Ron Rennick fda63f4536 move action scheduler to external via composer 2020-01-15 10:31:04 -04:00
Rodrigo Primo 793dba81f1 Fix failing unit test
This commit fixes the unit test
WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_return_error_when_invalid_image_is_passed() which was failing due to a change in a WordPress core message with the following error:

```
2) WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_return_error_when_invalid_image_is_passed

Failed asserting that two strings are equal.

--- Expected

+++ Actual

@@ @@

-'Invalid image: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.'

+'Invalid image: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini file or by post_max_size being defined as smaller than upload_max_filesize in php.ini.'

/home/travis/build/woocommerce/woocommerce/tests/unit-tests/util/api-functions.php:89
```

(https://travis-ci.org/woocommerce/woocommerce/jobs/637353161#L402)

This test only fails when using WordPress nightly build (the yet to be
released WP 5.4).

To fix this problem, this commit adds an if statement to check for different error
messages depending on the WordPress version that is being used to run
the tests. In the future, we might want to refactor this test to remove
its dependency to a WordPress error message to make it more robust and
stable.
2020-01-15 11:17:49 -03:00
Claudio Sanches 5bafac3012 Improved maxmind_missing_license_key_notice logic 2020-01-14 23:32:55 -03:00
Christopher Allford 42269f965c Added clarification that the MaxMind license key is not strictly necessary 2020-01-14 14:09:51 -08:00
Christopher Allford 27bcba1ac7 Added a deprecation to the old Geolite library wrapper class' public methods 2020-01-14 13:44:41 -08:00
Christopher Allford c34a5b6ffe Added an update task to increase the database version 2020-01-14 13:39:47 -08:00
Christopher Allford 1ac8eebac3 Added clarity to the file path in the integration settings 2020-01-14 13:32:59 -08:00
Christopher Allford e851160927 Removed the erroneous space on the woocommerce_geoip_updater scheduled event 2020-01-14 13:20:41 -08:00
Rodrigo Primo 241c6cd590 Make context for admin notice documentation more clear 2020-01-14 17:07:12 -03:00
Claudio Sanches 92478b4739 Introduced woocommerce_maxmind_geolocation_update_database_periodically filter 2020-01-14 16:57:07 -03:00
Rodrigo Primo efb200799d Merge branch 'fix/25361' of github.com:woocommerce/woocommerce into fix/25361 2020-01-14 16:47:06 -03:00
Rodrigo Primo 23e1abe1dc Fix typo in php docblock 2020-01-14 16:45:57 -03:00
Claudio Sanches f9c31589c6 Fixed conditional code 2020-01-14 16:44:01 -03:00
Claudio Sanches 10cdbf88be Use shop base address as default customer location 2020-01-14 16:29:48 -03:00
Claudio Sanches 992e13fb08 Updated implementation of geolite2 2020-01-14 16:24:07 -03:00
Claudio Sanches 46110fa39c Introduced woocommerce_get_geolocation filter 2020-01-14 15:54:24 -03:00
Claudio Sanches 978c5b5fb9 Apply woocommerce_maxmind_geolocation_display_notices filter in notices class 2020-01-14 15:22:53 -03:00