Commit Graph

199 Commits

Author SHA1 Message Date
Mike Jolley b6e7e4e8ad Improve category coupon message.
Closes #7463
2015-02-18 11:17:58 +00:00
Mike Jolley 62cb430eaa Run coupon codes through html_entity_decode.
Closes #7395
2015-02-12 22:50:22 +00:00
Mike Jolley e99b3a9bf8 limit_usage_to_x_items option in coupons.
Closes #7396
2015-02-12 22:39:40 +00:00
Mike Jolley c71bff2844 Only apply product/cat coupon checks for cart to cart coupons.
Closes #7389
2015-02-12 16:15:28 +00:00
Mike Jolley a54b9c61e2 Define coupon magic props 2015-02-03 14:20:46 +00:00
Claudio Sanches d6023818fd Fixed the increase and decreate of coupons usage count 2015-01-30 12:14:34 -02:00
Mike Jolley 147258d5b8 Fix cart coupon on-sale checks for variations.
Closes #7078
2015-01-13 16:12:54 +00:00
Mike Jolley 549d7ab2c0 Removed 'apply before tax' options for coupons - this should be the default core behaviour 2014-11-24 17:24:25 +00:00
Mike Jolley 537233efcc Split is_valid() into separate methods 2014-11-14 17:18:02 +00:00
Mike Jolley f600c5ec05 Limit coupons to X needs to persist across lines during calc
Fixes #6745
2014-11-14 16:38:33 +00:00
Mike Jolley 1d3b8db754 Move formatting logic 2014-11-14 16:22:01 +00:00
Mike Jolley 668e5ffb5c Some refactoring of the coupon class to load data with less code 2014-11-14 16:22:01 +00:00
Marin Atanasov 5ad973eac2 fixing small typo 2014-11-11 22:52:45 +02:00
Mike Jolley 0bc3ad868d [2.2] Fix error message with maximum amount
Fixes #6567
2014-10-21 14:55:43 +01:00
Mike Jolley 5ff8f65d1f Merge pull request #6507 from chrisnharvey/master
Pass cart item values to is_valid_for_product method in WC_Coupon
2014-10-17 12:09:23 +01:00
Barry Kooij b353c75d43 Display excluded categories in coupon error message.
Related #6400.
2014-10-14 16:18:31 +02:00
Barry Kooij 4371c661ec Codestyle. 2014-10-14 16:11:46 +02:00
Barry Kooij 389eae28c2 Display what products are excluded from using with a coupon.
Fixes #6400.
2014-10-14 16:09:56 +02:00
Chris Harvey 4119e70b3c Setting values to an optional argument 2014-10-13 09:32:40 +01:00
Chris Harvey 00c77d1716 Accept cart item values in is_valid_for_product method and pass these to the woocommerce_coupon_is_valid_for_product filter 2014-10-10 15:45:01 +01:00
shivapoudel 342d3186db Found and fix indendation for multiline comments for class-wc-coupon.php :) 2014-09-21 00:31:22 +05:45
Mike Jolley c4ef86d44e scrutinizer patches 2014-09-08 00:37:55 +01:00
adamawesomeface 0e22412a7d maximum ammount for coupon functionality added 2014-08-08 07:38:58 -04:00
Mike Jolley 0130caec2b indentation 2014-07-30 17:07:35 +01:00
wilgert 0b032ab469 Update class-wc-coupon.php
add middle statement to ternary operator has ommitting this is only supported since PHP 5.3 and WooCommerce requires >5.2.4
2014-07-21 15:59:20 +02:00
wilgert 6ccd084e52 Update class-wc-coupon.php
If you loaded custom coupon data using the  `'woocommerce_get_shop_coupon_data'` filter. Only `$coupon->amount` was set. While the 'normal' coupons loaded from the database get both `$coupon->coupon_amount` and `$coupon->amount` set.

This change also adds `$coupon->coupon_amount` for in code generated coupons and allows functions using the `'woocommerce_get_shop_coupon_data'` filter to use either `amount` or `coupon_amount`.
2014-07-21 15:54:10 +02:00
Mike Jolley 170399e5c3 Filter is_valid_for_product even when not relevant.
#5681
2014-07-04 11:03:12 +01:00
Mike Jolley 0448165c02 woocommerce_coupon_is_valid_for_cart
Closes #5681
2014-07-02 15:03:48 +01:00
Mike Jolley 6390e387e2 Additional check for product coupons and sale product exclusion. Fixes #5697 2014-06-25 13:46:47 +01:00
Jim Greenleaf 3b1f54f86c fix case-insensitive matching for coupon posts with uppercase chars 2014-04-30 23:29:29 -04:00
Mike Jolley a6a65a2a9d typecast $used_by to array in case its not set. Closes #5350 2014-04-24 15:26:38 +01:00
Akeda Bagus 2a97f07d47 Typo fix. 2014-04-15 22:56:35 +07:00
Mike Jolley 24c9d8b2e4 woocommerce_coupon_get_discount_amount filter in coupon class
Closes #5244
2014-04-07 10:26:43 +01:00
Mike Jolley 24e884a480 When dealing with fixed_product discounts, when doing it for the line, multiple by product qty Closes #5054 2014-03-06 12:29:25 +00:00
thenbrent f2a0e4bcdd Remove dup discount calculation 2014-01-30 21:54:33 -08:00
thenbrent 390afe9f90 Fix rounding bug with pre-tax product % coupon 2014-01-30 12:50:58 -08:00
Gregory K ec5f2c3501 PhpDoc fixes in class-wc-coupon 2013-11-25 10:00:54 -05:00
Coen Jacobs 4afbd0b556 Merge branch 'function-call-refactor'
Conflicts:
	includes/admin/post-types/meta-boxes/class-wc-meta-box-order-data.php
	includes/shortcodes/class-wc-shortcode-cart.php
	includes/wc-template-functions.php
2013-11-25 15:42:26 +01:00
Mike Jolley 51ba9c393f WC globals 2013-11-25 14:01:38 +00:00
Mike Jolley 3408965b8a Product functions 2013-11-25 14:01:38 +00:00
Coen Jacobs c1a439eb99 Formatting functions woocommerce to wc refactor 2013-11-25 14:34:21 +01:00
thenbrent fe44f020e3 Update calls to wc_add_message() function
Part of #4034
2013-11-12 20:59:39 -08:00
thenbrent 0d45e19fcf Update calls to wc_add_error() function
Part of #4034
2013-11-12 20:59:39 -08:00
Mike Jolley 5d2e1ac031 Refactor coupon code so coupons get the actual discount amount, redone edit coupon screen with tabs, added coupon item limits which Closes #3902 2013-10-18 18:10:58 +01:00
Mike Jolley 708423b96f Notices/undefined vars Closes #3911. 2013-10-11 12:31:36 +01:00
Mike Jolley c20a44c423 Coupon usage limits per user (using email + ID). Closes #3314 2013-10-01 11:48:27 +01:00
Mike Jolley e01df544ec Reworked total templates to support coupon lines, and started support for multiple shipping methods per order.
@todo store shipping methods in the order
@todo test with PP shipping real world

cc @coe
2013-08-14 21:00:34 +01:00
Mike Jolley 646a8a008c Make use of new functions 2013-06-11 15:59:54 +01:00
Mike Jolley c75ea04c1c classes -> includes 2013-06-11 14:25:30 +01:00