Commit Graph

93 Commits

Author SHA1 Message Date
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
Mike Jolley 2c70444123 Add subtotal to min and max spend code
Closes #16840
2017-09-20 13:51:41 +01:00
Mike Jolley bac98218f3 Merge pull request #16782 from hjoelr/bugfix-discounts-wrong-var
Bugfix: Discounts not using the right variable
2017-09-14 11:32:27 -07:00
Joel Rowley 458a6c87c7 Resolve 'non-numeric value encountered' error in PHP 7.1 when freeshipping coupon used 2017-09-12 21:33:43 -04:00
Joel Rowley bb5cb38832 Bugfix: Discounts not using the right variable 2017-09-11 15:56:49 -04:00
Mike Jolley 0337293e39 Merge pull request #16753 from hjoelr/bugfix-calc-disc-sequentially
Bugfix: woocommerce_calc_discounts_sequentially checks were doing the opposite of the WC setting
2017-09-08 11:44:43 +01:00
Joel Rowley 3b166b6a44 Bugfix: woocommerce_calc_discounts_sequentially checks were doing the opposite of the WC setting 2017-09-07 21:43:27 -04:00
Joel Rowley e6530a3555 Bugfix: wc_remove_number_precision() indirectly called twice from get_discount() 2017-09-07 21:34:58 -04:00
Mike Jolley 199eb78304 Support numeric coupon errors in is_coupon_valid 2017-09-07 11:14:05 +01:00
Mike Jolley d08bf4b489 Add option to disable validation when applying coupons
Closes #16720
2017-09-06 11:26:34 +01:00
Mike Jolley 31a90bdd85 Handle prices including tax calcs 2017-08-25 18:21:27 +01:00
Boro Sitnikovski 3cd1bedade Set coupon virtual state on when initializing virtual coupons during recalculation 2017-08-25 17:07:07 +02:00
Mike Jolley 8ce583889a Apply filters to carts only, and add is_virtual helper 2017-08-24 17:07:31 +01:00
Mike Jolley e99471c0cd Removed manual discounts code 2017-08-18 10:36:10 +01:00
claudiulodro 9a47146716 Fix discounts rounding issues 2017-08-15 14:11:25 -07:00
Mike Jolley 129eae141a Fix custom discount amounts not multiplying by qty 2017-08-15 16:25:39 +01:00
Mike Jolley 3c18d5e849 Adjust total discount for ex.tax 2017-08-15 16:25:39 +01:00
Mike Jolley de35d9ba02 Apply woocommerce_coupon_get_discount_amount without cents
cc @claudiulodro
2017-08-15 15:29:22 +01:00
claudiulodro ae80d12d80 Merge master 2017-08-14 11:12:09 -07:00
Mike Jolley 6f4fd61a4f Do not check if logged in 2017-08-14 12:28:03 +01:00
Mike Jolley 9eece1cb1e Include shipping and fee in total 2017-08-11 16:16:50 +01:00
Mike Jolley 3dc9f06f6a Remove fixed discounts correctly 2017-08-10 12:06:03 +01:00
Mike Jolley 06381f28bd Edit items rather than recreate 2017-08-10 11:38:09 +01:00
Mike Jolley f71dc64d35 Manual discounts and negative taxes 2017-08-09 18:53:10 +01:00
claudiulodro 1328e17069 Fix logic 2017-08-09 10:10:46 -07:00
Mike Jolley 722ac5ad78 Load order items 2017-08-09 16:16:36 +01:00
Mike Jolley 81806617d7 Fix total and rounding logic for tests 2017-08-08 09:24:26 +01:00
claudiulodro 80708255ee Fix inc tax price calculation 2017-08-02 11:07:33 -07:00