Commit Graph

37105 Commits

Author SHA1 Message Date
vedanshujain 892b7caa37 Stock managment fixes:
1. Use $already_reduced_stock instead of also considering $refunded_item_quantity while deleting orders. This will bring back part of #27504 again, but for now this seems to be the best solution for countering #28605. It needs discussion whether deleting a line item completely should also undo any refund related changes on it or not.

2. Also mark `stock_reduced` flag on order if any of the line item has any `_reduced_stock` flag. This will allow for stock restoring logic to work properly when order is cancelled.

3. Only adjust line item stock when order is in `processing`, `completed` or `on-hold` status state, because we need to reduce stocks on these status only. Stock adjustments in refunds or when changing statuses is already taken care of by their specific hooks.
2020-12-17 22:28:21 +05:30
vedanshujain 84d60e5fcf Add unit tests for all status change ops.
This loops and tests stock changes through ALL supported WooCommerce statuses. Hopefully this will make our inventory tracking more robust.
2020-12-17 22:28:21 +05:30
Leif Singer bc3e6a8532 Price calculation: fix documented return types
Fixes #26092.
2020-12-17 15:35:07 +01:00
zhongruige b23d5db546 Typo fix 2020-12-16 15:00:13 -07:00
Claudio Sanches 6c132c1e25
Merge pull request #28543 from woocommerce/fix/27521
Fix issue where customer could checkout although mandatory field "Country" was not given
2020-12-16 17:01:10 -03:00
Claudio Sanches d523f5aad2
Merge pull request #28538 from woocommerce/fix/remove-gb-from-eu-vat
Remove GB and IM from EU VAT countries
2020-12-16 16:59:02 -03:00
vedanshujain 6fa77b3d8e Fixup for myaccount page logic, it should be > 0 ot be considered as set. 2020-12-16 19:48:09 +05:30
vedanshujain 981d494d52 Add unit tests for #28592 2020-12-16 19:37:01 +05:30
vedanshujain 9ca52ee73b Fix unit test to use new coupon error messages.
This also removes some cart operations which are not needed anymore to since cart already has items that we were adding in those tests.
2020-12-16 16:21:33 +05:30
vedanshujain 6b550ffb23 Better error messages for when coupon are held in other transactions.
Earlier, we were just showing an "Usage limit reached message", however in some cases, specially when user is logged in, we can also ask them to go to MyAccount page and cancel order if they'd like to (to free up the coupon). This will hopefully make for a better user experience.
2020-12-16 15:19:40 +05:30
zhongruige 5131c922a2 Remove unneeded no-disabled-tests 2020-12-15 20:18:16 -07:00
zhongruige e178017e0a Added tests for the merchant order apply coupon flow 2020-12-15 20:14:02 -07:00
Tam Mullen 44d508e332
Merge pull request #28556 from woocommerce/add/e2e-merchant-orders-refund-order
Added new tests for the merchant order refund flow
2020-12-15 22:35:30 +00:00
roykho 9ffdfd3401
Check in package-lock 2020-12-15 14:21:05 -08:00
roykho 56c8c5dd41
Only uglify the changed file when Grunt watching 2020-12-15 12:40:05 -08:00
roykho 13d8adb257
Configure Grunt to run uglify on all JS assets 2020-12-15 12:28:22 -08:00
Ron Rennick f74969f1a6
Merge pull request #28548 from woocommerce/travis-retry
Retry e2e tests automatically in case of failure
2020-12-15 09:38:50 -04:00
zhongruige d8018cf28e Add missing trailing semicolon 2020-12-15 06:33:55 -07:00
Rodrigo Primo b18fb32aa9
Merge pull request #28565 from woocommerce/fix/issue-28260
Fix error tooltip misaligned on tax country field closes #28260
2020-12-15 09:48:22 -03:00
Rodrigo Primo 5842068cdf
Merge pull request #28587 from woocommerce/add/e2e-docker-image-delay
add 12 hour delay to pulling new docker tags
2020-12-15 09:17:12 -03:00
vedanshujain 507e7a27b2 Better error messages when coupons are stuck in a pending order.
We hold coupons when payment is failed if the setting "hold stock for checkout" is enabled for some minutes. This is to allow the customers to try again if they want, and to give time to complete payment for gateways where it could take some time.

Unfortunately this cause for some bad UX user retries by starting the order from scratch again, and then if they apply the coupon, usage limit gets hit because the earlier coupon is still held and is counted towards the usage. This commit improves the error message in these cases when usage is applied per customer and is hit, by stating to go to my account to complete/cancel payment (in case of logged in user) or to wait for some time in case of guest users.
2020-12-15 16:01:14 +05:30
Sam Seay 975388bfb3 Update wc-admin to 1.8.1 2020-12-15 15:00:08 +13:00
roykho 697e9a0c2f
Add woocommerce.zip to gitignore 2020-12-14 09:14:21 -08:00
roykho ecbbf08203
Add select2 to Grunt minify process 2020-12-14 07:48:54 -08:00
roykho cce5cbe985
Remove packaged minified files 2020-12-14 07:41:45 -08:00
roykho f89355f821
Git ignore packaged min files 2020-12-14 07:32:54 -08:00
Ron Rennick 733157638b update package changelog 2020-12-14 10:54:29 -04:00
Ron Rennick ef61903822 add 12 hour delay to pulling new docker tags 2020-12-14 10:42:39 -04:00
Vedanshu Jain 4339aee35f
Merge pull request #27352 from juliquiron/fix/slow-wc-customer-get-operations
Added cache and filter for wc-customer get operations.
2020-12-14 09:43:04 +05:30
zhongruige 88630e2a32 Add delete issued refund test 2020-12-13 16:07:16 -07:00
roykho 83f327026f
Fix error tooltip misaligned on tax country field closes #28260 2020-12-11 12:34:31 -08:00
zhongruige 9d95a21f48 Cleanup unused no-standalone-expect 2020-12-11 10:54:42 -07:00
zhongruige 88ddefbcb3 Dynamically pull the currency symbol instead of hard-coding it 2020-12-11 10:48:20 -07:00
zhongruige 4ca6114476 Swap out currency symbol 2020-12-11 09:47:03 -07:00
zhongruige 2caac87d03 Added new tests for the merchant order refund flow 2020-12-10 21:27:04 -07:00
Tam Mullen 1add2556d6
Merge pull request #28437 from woocommerce/add/e2e-merchant-orders-filter-orders
Added tests for Merchant / Orders / Filter Orders flow
2020-12-10 20:54:19 +00:00
Peter Fabian 38546b43d5
Merge pull request #28400 from szepeviktor/patch-3
Put Travis configuration in chronological order
2020-12-10 19:21:09 +01:00
Rodrigo Primo 2accebdd2e Retry e2e tests automatically in case of failure
This commit adds again the Travis function `travis_retry` (https://docs.travis-ci.com/user/common-build-problems/#travis_retry) to all the commands used to execute the E2E tests as they sometimes fail due to factors outside our control and they pass if we retry them manually. See for example this issue for an instance where often times the E2E tests fail, the issue describes a problem that happened in a local environment, but we see the same error happening on Travis as well: https://github.com/woocommerce/woocommerce/issues/27846. I actually just saw it and had to restart a Travis build job manually and that is what prompted me to create this commit. Having Travis retry the command automatically should save us some time when we review PRs as there is a chance the command will pass on a subsequent run and we won't have to retry it manually and wait for it to finish.

We have used this function in the past (see 67b5b270f3), but it got removed in 1658dd3962. But after some conversation about it a couple of weeks ago, we decided to use it again.
2020-12-10 14:44:06 -03:00
Rodrigo Primo 93dae948b2 Add placeholder text to country select field in the checkout page
This commit adds the 'Select a country / region...' text as a placeholder text displayed in the country select field indicating to the user that they need to select a country. This is only needed when the option ¨Default customer location" is set to "No location by default".
2020-12-10 11:12:39 -03:00
Rodrigo Primo 5554f9c6f9 Revert "Sets Select a country option element value attribute to default."
This reverts commit 9faee1d909 as it causes issues during checkout (see #27521).
2020-12-10 10:09:02 -03:00
Peter Fabian 60e8082398 Isle of Man will probably also stop being part of EU VAT area. 2020-12-10 09:59:26 +01:00
Peter Fabian 135294dfdd Removed GB from EU VAT zone. 2020-12-10 09:46:24 +01:00
Gary Cao e6a7f0f40a
Fix Unknown named parameter error on PHP 8 2020-12-10 15:21:34 +09:00
Néstor Soriano 15315d2468
Merge pull request #28499 from woocommerce/fix/26494
Remove deprecated PayPal Standard "Page style" setting
2020-12-09 12:32:37 +01:00
Roy Ho 7f4ad80cbd
Merge pull request #28204 from jlavoie13/add/pass-email-object-to-template-parts
Pass email object to header and footer templates
2020-12-08 15:02:37 -08:00
zhongruige c07f31f22c
Merge branch 'master' into add/e2e-merchant-orders-filter-orders 2020-12-08 15:50:00 -07:00
zhongruige 1dfedf425c Code review feedback--setting the consts in the test itself 2020-12-08 15:09:23 -07:00
Roy Ho 593cd0ea5d
Merge pull request #27675 from woocommerce/fix/update-premium-support-link-href
Update href of premium support link
2020-12-08 13:46:44 -08:00
Roy Ho 8f37a6936f
Merge pull request #28014 from JoryHogeveen/feature/20-10-20-price-slider-init-trigger
Widget: Price Slider - trigger to re-initialize
2020-12-08 13:35:10 -08:00
Roy Ho 018dbc251d
Merge pull request #28386 from abhishek-pokhriyal/remove/bc-check-determine-locale
Remove function_exists check for determine_locale
2020-12-08 13:15:22 -08:00