Commit Graph

36334 Commits

Author SHA1 Message Date
Nestor Soriano ed33a607a7 Remove a useless test assertion that fails in PHP 8
The assertion is useless (the constant is already tested a few Lines
above), and it was failing in PHP 8 because 'auto' < 2 is evaluated
as false, while it's evaluated to true in PHP 7.
2020-10-02 15:27:26 +02:00
Rodrigo Primo b1a1984bdd Revert string capitalization to the original version
PR #25419 added a filter to change the value of the text in a button in
the cart-empty.php template. But it mistakenly changed the
capitalization of the string from 'Return to shop' to 'Return To Shop'.
This commit simply restores the string to its original version.
2020-10-02 08:41:25 -03:00
Gerhard 0fd329c57f Adjust short description and opening paragraph to mention ecommerce 2020-10-02 13:36:34 +02:00
Gerhard 029316c7a4 Update readme opening paragraphs 2020-10-02 12:13:11 +02:00
Nestor Soriano 7485b9165f Convert optional-before-required arguments to required.
In PHP 8 required parameters after optional parameters in
function/method signatures trigger a deprecation notice. These type
of parameters are pointless since a value needs to always be
provided for them anyway, so they are actually de-facto required.

This commit converts all these not-so-optional parameters into
truly required parameters by removing their default values.
2020-10-02 09:45:09 +02:00
Nestor Soriano 53d33457e3 Fix code style/sniffer errors in a few files. 2020-10-02 09:34:09 +02:00
Christopher Allford 54b876fc75 Adjusted the typing of the ModelRepository and related interfaces to better distinguish between parent & child models 2020-10-01 18:06:34 -07:00
Christopher Allford 8f5ff436a2 Added support for flat parents to simplify calls with them 2020-10-01 17:48:37 -07:00
Christopher Allford a01da2da93 Updated the lock files 2020-10-01 16:04:03 -07:00
Christopher Allford e6efbdde34 Merge branch 'master' into packages/api/add/repository-listing 2020-10-01 15:58:48 -07:00
Christopher Allford 8ee89eb85d Documentation fixes 2020-10-01 15:53:30 -07:00
Christopher Allford cfa20570c1 Added appropriate HTTP errors to REST repository methods 2020-10-01 15:37:58 -07:00
Christopher Allford f8574bed56 Added a utility service for updating settings 2020-10-01 15:23:46 -07:00
Christopher Allford f0ad6e4fc2 Added aliases to make repository types easier to read 2020-10-01 15:00:27 -07:00
Christopher Allford 787040db4c Adjusted the ModelRepository to make repository methods more type-safe 2020-10-01 14:31:55 -07:00
Christopher Allford f2dda16c40 Updated lock files 2020-10-01 14:28:14 -07:00
Rodrigo Primo 788969d2bb
Merge pull request #27832 from woocommerce/update/woocommerce-admin/1.6.0-rc.3
Update woocommerce-admin to 1.6.0-rc.3
2020-10-01 15:41:59 -03:00
Rodrigo Primo 7d5ac90ff0
Merge pull request #27822 from woocommerce/fix/set-activation-redirect-transient-for-new-installs-only
Update the activation transient to only get added on new installs
2020-10-01 15:06:44 -03:00
Ron Rennick c17b6b5ad0 Update expected industry count 2020-10-01 14:46:04 -03:00
Ron Rennick 4af90518da lock file maintenance 2020-10-01 14:21:40 -03:00
Timmy Crawford 7efccce126 Update woocommerce-admin to 1.6.0-rc.3 2020-10-01 06:39:57 -07:00
Ron Rennick 8910357437 add missing test stubs 2020-10-01 10:25:22 -03:00
Nestor Soriano 52eed70f04 Add a 'NumberUtil' class with a 'round' method.
There's a number of places in the WooCommerce codebase where the
built-in function 'round' is executed passing a non-numeric value
(not a number and not a string that can be parsed as a number),
for example round(''). In PHP 7 this yields a value of 0, but in
PHP 8 this throws an error.

This commit adds a 'NumberUtil' class with a static 'round' method,
this method checks if the passed value is numeric and if so it just
executes the built-in function, otherwise it returns 0. And all the
calls to 'round' in the codebase are replaced with 'NumberUtil::round'.
2020-10-01 11:08:51 +02:00
Nestor Soriano b1e81d02da Fix code style/sniffer errors in a few files. 2020-10-01 11:08:51 +02:00
Jonathan Sadowski e540b4820e Rename maybe_enable_setup_wizard to maybe_set_activation_transients 2020-09-30 17:27:43 -05:00
Jonathan Sadowski 83238ec1d7 Move maybe_enable_setup_wizard abode update_wc_version so new install is detected 2020-09-30 17:01:43 -05:00
Jonathan Sadowski 95755cb59d Update the activation transient to only get added on new installs 2020-09-30 16:00:45 -05:00
Christopher Allford d245a60c6e
Merge pull request #27739 from woocommerce/packages/factories-to-api-refactor
Transform @woocommerce/model-factories into @woocommerce/api
2020-09-30 13:46:04 -07:00
Christopher Allford f6cbab8d07 Added missing static helpers for fetching repositories 2020-09-30 13:16:46 -07:00
Christopher Allford fccf1fb66e Added settings and group repositories with some basic functionality 2020-09-30 13:11:31 -07:00
Ron Rennick be15429c30 restore ability to run individual tests 2020-09-30 17:05:02 -03:00
Ron Rennick 72219b2323 move merchant tests to package 2020-09-30 14:41:31 -03:00
Christopher Allford 4c2637c479 Added a `list` operation to the repository 2020-09-30 07:59:10 -07:00
Christopher Allford f571324a09 Added better type-safety when distinguishing between resources that are children and those that are not 2020-09-29 18:40:50 -07:00
jonathansadowski 2c1fe4235d
Merge pull request #27806 from woocommerce/fix/wca-install-redirect
Add back in activation transient to redirect on install
2020-09-29 16:23:10 -05:00
Ron Rennick 76f591251a move front end tests to package 2020-09-29 17:00:34 -03:00
Ron Rennick 27e79f465f split activation, onboarding, setup tests into separate files 2020-09-29 16:16:43 -03:00
Christopher Allford 8c5548d06e Added @template JSDoc tag to API package for better IDE support 2020-09-29 12:00:09 -07:00
Joshua Flowers 048c43a37f Add back in activation transient to redirect on install 2020-09-29 14:25:15 -04:00
Ron Rennick 1abbe3f273 initial core test package files, move setup tests to package 2020-09-29 15:22:20 -03:00
Ron Rennick 802b364b05 Merge branch 'master' into fix/27681 2020-09-28 16:17:51 -03:00
Ron Rennick fd60f7052a Merge branch 'master' into fix/e2e-url-no-port 2020-09-28 16:15:22 -03:00
Nestor Soriano f419335cdf Remove the migration to delete variation term relationships. 2020-09-28 09:35:13 +02:00
Christopher Allford ef93f22321 Moved the product model for consistency with other model types 2020-09-25 14:08:19 -07:00
Christopher Allford 789773c65c Fixed E2E test 2020-09-25 14:05:11 -07:00
Christopher Allford 44c7428358 Updated package lock files and fixed test error 2020-09-25 13:49:54 -07:00
Christopher Allford 760b0e4cdb Merge branch 'master' into packages/factories-to-api-refactor 2020-09-25 13:19:36 -07:00
Christopher Allford 73deab28a5
Merge pull request #27785 from woocommerce/fix/onboarding-flow-4-6
Update onboarding flow for 4.6
2020-09-25 13:16:19 -07:00
Christopher Allford c09d91f6ce Finished adding appropriate documentation to the API package 2020-09-25 11:11:17 -07:00
Ron Rennick 6b7d67e587 update onboarding flow for 4.6 2020-09-25 12:06:45 -03:00