Commit Graph

120 Commits

Author SHA1 Message Date
Jeremy Pry 01e1ef73e7 Handle item limit for custom coupon types
Fixes #20455
2018-06-08 14:18:16 -04:00
Mike Jolley 869415763c
Merge pull request #20396 from rnaby/060618-005642-wc-discounts-object-var-type
WC_Discounts | object Property Type PHPDoc Fix
2018-06-06 12:15:46 +01:00
Mike Jolley f9d9c395c7
Merge pull request #20397 from rnaby/060618-010003-wc-discounts-set_items_from_order
WC_Discounts|set_items_from_order Param Type Fix
2018-06-06 12:15:33 +01:00
Mike Jolley 833df18dff
Merge pull request #20398 from rnaby/060618-010246-wc-discounts-constructor
WC_Discounts | __construct PHPDoc and Param Fix
2018-06-06 12:15:19 +01:00
Mike Jolley 113d7ad781
Merge pull request #20400 from rnaby/060618-014013-wc-discounts-apply_coupon
WC_Discounts | apply_coupon Removed Unused Variable
2018-06-06 12:14:32 +01:00
Khan M Rashedun-Naby ad7bc84c2b WC_Discounts | apply_coupon PHPDoc @throws Fix 2018-06-06 01:47:16 +06:00
Khan M Rashedun-Naby ba5671c052 WC_Discounts | apply_coupon Removed Unused Variable 2018-06-06 01:41:54 +06:00
Khan M Rashedun-Naby 1ce8338572 WC_Discounts|__construct PHPDoc and Param Fix 2018-06-06 01:08:35 +06:00
Khan M Rashedun-Naby 9310970938 WC_Discounts|set_items_from_order Param Type Fix 2018-06-06 01:01:39 +06:00
Khan M Rashedun-Naby a89161c8bf WC_Discounts| Type PHPDoc Fix 2018-06-06 00:57:49 +06:00
Claudio Sanches a1a82b09bb Fixed includes/class-wc-discounts.php PHPCS violations 2018-03-21 00:00:54 -03:00
Chunkford 5416c58f4e
Update class-wc-discounts.php 2018-03-07 13:36:43 +00:00
Mike Jolley 58c87e3fcd
Merge pull request #19148 from woocommerce/tweak/post-processing-custom-coupons
Add filter to allow post processing on custom coupons
2018-03-05 19:18:04 +00:00
Chunkford dce96daa84
Add filter to a coupon's expiry date check
I need the ability (and hopefully others now or in the future) to intercept the expiry date check for a coupon.
This pull request offers that ability.
2018-03-03 11:46:14 +00:00
Boro Sitnikovski 1a1f62c952 Separate coupon custom logic into its own method 2018-02-28 13:42:52 +01:00
Boro Sitnikovski b2e9fbb22d Add filter to allow post processing on custom coupons 2018-02-28 13:41:18 +01:00
Frédéric Demarle ac199889f2 Fix fatal error in PHP < 5.5 2018-02-27 20:55:40 +01:00
Claudiu Lodromanean 5346f63abc
Merge pull request #19159 from woocommerce/fix/19124
Use subtotal for discounts in admin/orders
2018-02-27 11:27:01 -08:00
Mike Jolley a6431c86d3 Use subtotals when applying discount logic to match cart. 2018-02-27 18:48:05 +00:00
Kathy Darling d494daf3cd Merge branch 'master' of github.com:woocommerce/woocommerce into exclude-products-from-coupon-validation 2018-02-23 22:09:06 -06:00
Caleb Burks 9ba4ae7ad7 Remove unnecessary conditional 2018-02-22 14:39:37 -05:00
Kathy Darling caf03064ac add getter for class' object property 2018-02-16 15:52:04 -06:00
Kathy Darling 8dc3d689c6 Follow up to #18971. Pass cart/order items through a filter. 2018-02-16 15:51:35 -06:00
Gerhard Potgieter 97ca671efa Validating user usage limit should check that of customer and not logged in user when applying coupons in admin area. 2018-01-26 12:37:23 +02:00
Mike Jolley 0363312084 spacing 2018-01-11 15:01:07 +00:00
Mikalai Okun 2e2e5d60e5
Updated strval() to round() 2018-01-11 08:49:54 -05:00
Mikalai Okun cd8c09769d
Workaround for precision on floating values. 2018-01-11 01:38:36 -05:00
Mike Jolley da281d21ab Keep product check 2018-01-02 11:57:29 +00:00
Jason Kytros a21ada68cd Fix coupon 'Excluded Categories' restriction evaluation 2017-12-22 11:21:47 +02:00
Mike Jolley 8e851d834f Rounding and price should match the cart. 2017-12-04 20:38:29 +00:00
Mike Jolley 72b3b5055b FIx variable in get_object_subtotal 2017-11-16 12:03:02 +00:00
Mike Jolley 541dde95b3
Merge pull request #17710 from woocommerce/fix/17697-coupon-spend-incl-taxes
Coupon min/max spend based on displayed subtotal
2017-11-16 10:59:43 +00:00
Gerhard Potgieter a59f325f41 Add get_object_subtotal helper method, remove subtotal variable in favor of helper method 2017-11-16 12:43:50 +02:00
Gerhard Potgieter 4521011219 Adjust discount on min/max spend to work based on the displayed subtotal. 2017-11-15 13:44:07 +02:00
Mike Jolley 9e2786a0a3 Today up logic 2017-11-15 10:31:31 +00:00
Gerhard Potgieter 0436e9afcb Rework tax calculations to work with inclusive and exclusive pricing 2017-11-15 12:23:52 +02:00
Gerhard Potgieter 8cbca4d9d9 Include taxes in minimum and maximum coupon validation checks. 2017-11-15 12:04:02 +02:00
soft79 b74eaba287
Update class-wc-discounts.php
'woocommerce_coupon_get_apply_quantity' => ( $apply_quantity, $item, $coupon, $discounts )
2017-11-11 20:33:19 +01:00
Mike Jolley 624c1a9516 Allow items to be sent directly to the discounts class 2017-11-02 16:18:17 +00:00
Mike Jolley 87c6ca5ae0 Merge pull request #17368 from james-allan/fix_thirdparty_coupon_calculations
Fix coupon discount calculations for third party coupon types
2017-10-26 14:23:31 +01:00
James Allan c0e3ac8ce6 fix coupon discount calculations for thirdparty coupon types 2017-10-25 16:33:59 +10:00
Mike Jolley 1a08afeab2 Don't apply remainder logic when discount amount is changed via a filter
Closes #17330
2017-10-24 18:07:23 +01:00
Mike Jolley 8ca76e84cd Add test for #17330 2017-10-24 17:53:51 +01:00
Mike Jolley 6223ffb684 Adjust item limiting logic to work with multiple coupons
Fixes #17275
2017-10-22 09:13:12 -07:00
Mike Jolley 1278c84c11 Revert "WIP"
This reverts commit 2255066c0f.
2017-10-22 07:13:46 -07:00
Mike Jolley 2255066c0f WIP 2017-10-22 07:13:31 -07:00
Mike Jolley 4379a47cd5 Fixed discount logic to also look at parent categories when validatiing coupons
Fixes #17150
2017-10-12 15:40:58 +01:00
Mike Jolley 40040f534b These classes require WC_Cart objects 2017-09-27 17:12:45 +01:00
Claudiu Lodromanean 5e24b86d61 Merge pull request #16866 from woocommerce/fix/16840
Add subtotal to min and max spend code
2017-09-21 09:08:34 -07:00
Mike Jolley 9c63da78c4 Fixed limit to x by avoiding changing the original item (uses clone) 2017-09-20 18:42:10 +01:00