Aristeides Stathopoulos
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
741f2b954a
Squiz.WhiteSpace.SuperfluousWhitespace.EndLine
2016-08-27 07:01:22 +03:00
Aristeides Stathopoulos
55075ce3a4
WordPress.Arrays.ArrayDeclaration.IndexNoNewline
2016-08-27 06:35:20 +03:00
Aristeides Stathopoulos
17961f6484
WordPress.Arrays.ArrayDeclaration.ValueNoNewline
2016-08-27 06:04:10 +03:00
Aristeides Stathopoulos
b063bcfe4c
last item in a multiline-array should end in a comma
2016-08-27 04:46:45 +03:00
Claudio Sanches
2b7e725928
Tests for wc_get_coupon_code_by_id()
2016-08-24 14:17:58 -03:00
Mike Jolley
c55170698e
More namespaces removed
2016-08-16 10:50:24 +01:00
Mike Jolley
78142a8ebb
Merge branch 'master' into WC-CRUD
...
# Conflicts:
# includes/class-wc-checkout.php
# includes/class-wc-coupon.php
# includes/class-wc-customer.php
# tests/unit-tests/cart/cart.php
# tests/unit-tests/cart/functions.php
# tests/unit-tests/coupon/coupon.php
# woocommerce.php
2016-06-13 15:01:58 +01:00
Mike Jolley
2fec0f425a
Remove namespaces from tests for 5.2 support
2016-03-23 12:14:13 +00:00
Justin Shreve
7f0e0c8f0c
Finish proper integetration with WC_Data's meta methods.
2016-03-17 11:14:15 -07:00
Justin Shreve
f65c9305bf
Update WC_Coupon to use the new WC_Data class and meta methods.
2016-03-17 09:38:56 -07:00
Justin Shreve
90b9192c0c
Combine standard getters and setters into one test to reduce code.
2016-03-17 09:19:29 -07:00
Justin Shreve
60085e582a
Fix some comments/spacing issues.
2016-03-17 09:19:29 -07:00
Justin Shreve
f973b9d122
Make some improvements to metadata. Don't return [0] array, allow setting custom meta with a WC_Coupon method. Fix up some tests.
2016-03-17 09:19:29 -07:00
Justin Shreve
69973d520e
Update version strings
2016-03-17 09:19:28 -07:00
Justin Shreve
0268a67c4b
Address a few of the feedback items from the PR:
...
* Switch all coupon fields to _data
* Move coupon custom fields to _meta_data
* Shorten the 'yes' -> true checks
* Add a test for getting custom fields
2016-03-17 09:19:28 -07:00
Justin Shreve
50e1bc7117
Add tests for the getter/setter methods
2016-03-17 09:19:28 -07:00
Justin Shreve
7a0c8d146b
Add the ability to create coupons via code (so things like Points & Rewards will still work).
2016-03-17 09:19:27 -07:00
Justin Shreve
3eacb992bc
Address issues from Mike's Feedback:
...
* Rename individual use, free shipping, and exclude sale items to match their meta names closer.
* Sanitize emails when using set_email_restrictions
* Remove some unnecessary explict true checks
* Move ID into _data with the rest of the fields
* Fixed some spacing issues
2016-03-17 09:19:27 -07:00
Justin Shreve
447462b274
Allow access to coupon properties directly to allow for back-compat usage, but throw a deprecated notice. Also adds a test to make sure these properties work as they should.
2016-03-17 09:19:27 -07:00
Justin Shreve
d738dec05d
Coupon CRUD (WIP).
2016-03-17 09:19:27 -07:00
Claudio Sanches
ee30b5b308
Fixed php docs standards
2015-11-03 11:31:20 -02:00
Claudio Sanches
0ff88deb98
Improved wc_coupons_enabled() name and description
2015-10-29 17:23:10 -02:00
Claudio Sanches
f3694cf17b
Fixed tests for the new cart and coupons functions
2015-10-28 16:09:53 -02:00
Mike Jolley
2ddd07b252
FIx fixed product discount
2015-04-10 10:55:40 +01:00
Barry Kooij
d6b970a61d
Namespace the Unit Tests
2015-03-06 16:32:40 +01:00