Commit Graph

46 Commits

Author SHA1 Message Date
Ken Bass 23d6677c28 Allow user error message on filtered invalid coupon error messages 2013-02-18 14:05:23 -05:00
Mike Jolley 807ec3a106 Prepend constants, renamed functions, split messages from errors. #2456 2013-02-18 12:29:10 +00:00
Ken Bass fe8a34a069 A different attempt 2013-02-14 23:18:58 -05:00
Ken Bass b0a5402f11 Add ability to filter 'coupon code' 2013-02-14 19:29:55 -05:00
Mike Jolley fb67343611 Tweak content. Closes #2311 2013-01-29 13:58:57 +00:00
aj-adl a766771740 removed unnecessary line 2013-01-29 05:23:52 -08:00
Alex Bishop 793a143432 #2311 Fix for 'Exclude sale items from coupon'
included a checkbox on the coupon writepanel for the option

Had issues originally, worked out the in_array() needed to be a strict
type as woocommerce_get_product_ids_on_sale() has a '0' string in it.

Tested using 3.5.1 + git clone of WooCommerce
2013-01-29 23:47:52 +10:30
Alex Bishop f78d3a0e13 Revert "Added 'Exclude Sale Products' option to coupons"
This reverts commit b763c7449a.
2013-01-29 23:41:58 +10:30
Alex Bishop b391e66cf7 Revert "Updated everything so it actually works rather than fails hard"
This reverts commit 2379a3a1bb.
2013-01-29 23:41:57 +10:30
Alex Bishop 13de8d9203 Revert "Reset, please ignore"
This reverts commit 3e59e64da3.
2013-01-29 23:41:57 +10:30
Alex Bishop 3e59e64da3 Reset, please ignore
Long Story.
2013-01-29 23:41:00 +10:30
Alex Bishop 2379a3a1bb Updated everything so it actually works rather than fails hard
I messed up badly on the original with inheritance of variables, and
after a lot of issues realised that strict matching was necessary due
to the '0' string in woocommerce_get_products_on_sale()

Not hard to tell I am new to php.

Regardless this now functions as intended, stopping discount from being
applied to products with active sale prices or carts with items on sale
inside them.
2013-01-29 22:55:03 +10:30
Alex Bishop b763c7449a Added 'Exclude Sale Products' option to coupons
Added exclude sale products functionality based of the 'exclude product
ids' functionality in wc-coupon/wc-cart.

Compares product ID's in cart vs ID's in the array
'woocommerce_get_product_ids_on_sale'
2013-01-29 13:54:54 +10:30
Mike Jolley 087c4cd983 Notices. Closes #2053. 2012-12-27 18:46:22 +00:00
Mike Jolley 6ee68e063f fix coupon and meta in product class 2012-12-20 11:30:27 +00:00
Mike Jolley f972501dfa get_post_meta instead of get_post_custom - cut out the middleman. #1765 2012-12-19 21:01:15 +00:00
Coen Jacobs 944ea5df3d Use returned coupon error message in cart. Closes #1994 2012-12-19 15:57:46 +01:00
Coen Jacobs 3d2c18db6b Cleared coupon class of coupon_valid, use is_valid #1994
Will rewrite all internal constructions of WC_Coupon to use the
is_valid() method instead.
2012-12-19 15:39:31 +01:00
Coen Jacobs c8fa43d7bb Constructors can't return data. Set property instead. Closes #1994
Instead of returning the bool (which is impossible in a constructor)
the WC_Coupon constructor now sets a property coupon_valid during
constructing that can be used to check if the coupon is valid.
2012-12-17 13:20:22 +01:00
Warren Holmes 23564f9995 Correct scope, remove use of var.
- class-wc-coupon.php
2012-12-14 23:41:59 +02:00
Mike Jolley a697ffbeb6 Coupon rework, reports, and styles. Closes #1862. 2012-12-11 17:02:48 +00:00
Mike Jolley e5df3dce87 timestamp 2012-12-04 20:24:37 +00:00
Patrick Garman ed9d5abfd6 Expire in local timezones instead of UTC (or the timezone of the server) 2012-12-04 10:24:08 -06:00
Mike Jolley b1ec4b289a Nuked whitespace. Closes #1846. 2012-11-27 16:22:47 +00:00
Mike Jolley 764b34a938 Case insensitive coupons. Closes #1633. 2012-11-08 16:57:59 +00:00
Coen Jacobs 3baaf6029a Removed all deprecated classes and functions except for 1.6.x template files and functions 2012-11-08 16:27:47 +01:00
Coen Jacobs 9769b8851f [3.2.4] Sanitization #1575 2012-10-18 12:33:52 +02:00
Mike Jolley 6496215d48 show currency. Closes #1468. 2012-09-06 17:47:16 +01:00
Mike Jolley 9d2b9be190 tweak string 2012-08-31 09:47:57 +01:00
Mike Jolley 8cdbf6b5a4 Added more error messages for coupons 2012-08-31 09:45:50 +01:00
Mike Jolley 5d152f2181 Class docs 2012-08-15 19:15:10 +01:00
Mike Jolley 07b6b6d59a More class docs 2012-08-14 23:43:54 +01:00
Mike Jolley e86cbfe59e prevent notice when id is not set 2012-07-31 13:28:03 +01:00
Aaron Holbrook b4a62dc49b Fixed typos (depreciate should be deprecate) 2012-07-23 13:14:02 -05:00
Mike Jolley 1910f4a4f7 Coupon usage counts on cancell. Closes #1210. 2012-07-10 16:52:52 +01:00
Mike Jolley 967da77d88 Check coupons are valid before cart/checkout 2012-06-13 19:58:06 +01:00
Mike Jolley ec4a59432a Better errors. Closes #1018. 2012-06-10 19:07:19 +01:00
Mike Jolley cf0ee3fdea Minimum coupon amount check 2012-06-01 19:01:44 +01:00
Mike Jolley aea9f5f55e fix coupon check 2012-03-20 18:36:25 +00:00
Mike Jolley da113b7589 customer coupons. Ability to refresh the totals through code. 2012-03-14 11:41:32 +00:00
Mike Jolley 01e7a2d539 Product id rules for coupons apply to a products parent (useful for grouped products) 2012-03-12 13:11:08 +00:00
Mike Jolley 261015fbad minimum amount for coupons 2012-03-07 21:38:34 +00:00
Mike Jolley 9d821d7f52 Category inclusion/exclusion for coupons 2012-03-06 17:28:09 +00:00
Mike Jolley 797de881ec Coupon case. Closes #599. 2012-02-08 15:55:08 +00:00
Mike Jolley ce84132713 Minor fixes and comments 2012-01-30 19:24:52 +00:00
Mike Jolley 0836ce04db Better class names (final) 2012-01-27 16:38:39 +00:00