This commit fixes all 1533 PHPCS errors that PHPCBF can fix automatically in the tests/ directory. Before this change there was a total of 3106 PHPCS errors in the WooCommerce repository and now there is 1573 errors.
This commit moves the `dependencies` section in package.json to appear before `devDependencies` as the former is more important than the latter and this seems to be the standard for other package.json files.
This commit moves github-contributors-list in package.json from the `dependencies` section to the `devDependencies` section. This package is used to generate the list of WC contributors for each release and it is not needed to run WC.
This commit updates npm packages to their latest versions:
- chromedriver 2.46.0 → 74.0.0
- husky 1.3.1 → 2.1.0
- node-sass 4.11.0 → 4.12.0
Those three packages are devDependencies and since we are early in the WC 3.7 release cycle this change shouldn't cause any issue. I'm doing this to see if updating the chromedriver package fixes the failing e2e test that is failing on Travis (example of a failure: https://travis-ci.org/woocommerce/woocommerce/jobs/524016366#L829). I'm not able to reproduce this error on my local machine and in the past updating chromedriver fixed failing e2e tests.
PR #23196 added a workaround to `parse_str()` limitation when dealing with full-stops, pluses, and spaces in the parameter key. This workaround involved temporarily replacing those three characters with placeholders before calling `parse_str()` and then replacing back to the original form. This commit fixes a bug in this logic that was replacing back only parameters keys and not parameters values.
For example, if the query string is `?query.parameter=foo.bar`, the resulting <input> field contained `foo{dot}bar`, instead of the expected `foo.bar`.
Allow product object to be passed through, remove cache clearing which is done during save(), and allow the caller to define whether or not an update routine is already in progress.
It is not necessary to use the $message parameter of assertEquals() to output the value of $actual_html, as PHPUnit already output this variable value in case of error.
The dismiss button in the WC admin notices `legacy_shipping` and `no_shipping_methods` was not fully clickable due to a custom CSS applied to them. This custom CSS was used to add a background image to those notices. More specifically, the problem was caused by the use of `position: relative` applied to `<p>` elements. I couldn't find an easy way to fix this problem keeping the custom background image, so I opted to remove it to make the design of all notices identical (besides the background image, the custom CSS also added a few other differences to those to notices like the font size of the notice title).
This commit bumps the default WC API version used when users are creating a new webhook. Before this change the default version would be v2, and after this change it is v3 which is the latest API version.
In the future we might want to create a method in WC_API class or somewhere else that returns the latest WC API version and use it in `includes/class-wc-webhook.php` instead of hard-coding the version number.
wc_update_product_stock reads product from the db twice, so if it's out of sync, strange things are happening.
Also, changes dependant on stock status might get reverted if local copy of $product is not updated after wc_update_product_stock.