Commit Graph

14 Commits

Author SHA1 Message Date
Vedanshu Jain 3bf473517d
Merge pull request #25708 from woocommerce/update/reserve-stock-for-checkout
Introduce a `reserved stock` class and database table to prevent race conditions during checkout
2020-04-07 02:16:22 +05:30
Mike Jolley 9b5189dc7a Remove tests for order methods which were removed 2020-04-03 15:55:15 +01:00
Claudio Sanches 2ebd86f2dc Revert "Revert "Add support for '_held_for_checkout` records to prevent race conditions."" 2020-04-03 15:55:13 +01:00
vedanshujain 0af20fe4ef Add unit test for guest checkout with per user coupon usage limit. 2020-04-02 15:04:57 +00:00
vedanshujain a2418156d4 Add tests 2020-03-11 20:47:24 +05:30
Claudio Sanches 2ce4a60ff1
Remove old unit test 2020-01-06 19:37:47 -03:00
vedanshujain ff2a8a58f2 Commented out flaky test 2019-12-17 19:13:19 +05:30
vedanshujain 9b7343d23b Applied coding standards 2019-12-17 19:13:19 +05:30
vedanshujain 72545c44b7 Add support for `_held_for_checkout` records to improve performance.
This will also improve transactional stability and avoid race conditions by providing a way to lock usage counts.
2019-12-17 19:13:19 +05:30
Claudio Sanches a12c25862b
Revert "Add support for '_held_for_checkout` records to prevent race conditions." 2019-12-04 16:03:05 -03:00
Claudio Sanches df4eb9c817 Use wc_get_order() in unit tests, and fixed coding standards 2019-12-03 16:44:37 -03:00
Claudio Sanches 988b72e461 Updated filter name to woocommerce_hold_stock_for_checkout
Also fixed coding standards
2019-12-03 16:38:17 -03:00
vedanshujain 5ef41f1ecc Empty cart before test to make sure everything in cart exists 2019-11-26 18:21:24 +05:30
vedanshujain 70a54d0639 Added Unit Tests for `held_for_checkout` records. 2019-11-21 18:11:37 +05:30