Rodrigo Primo
28c8ae8f95
Add the class name to deprecated messages wherever appropriate
...
Doing this change to make it easier to locate the deprecated method and its replacement and also to be consistent with the other deprecated messages.
2017-03-23 12:32:02 -03:00
Claudio Sanches
59c2849736
Changed version 2.7 to 3.0
2017-03-15 13:36:53 -03:00
Mike Jolley
d55653a408
Merge branch 'master' into fix-13498
...
# Conflicts:
# includes/class-wc-order.php
# tests/unit-tests/crud/data.php
2017-03-15 15:52:40 +00:00
Claudiu Lodromanean
9703af350d
Use correct legacy date format
2017-03-15 08:19:17 -07:00
Claudiu Lodromanean
62d00ff950
Return offset timestamp not utc in legacy
2017-03-14 10:39:37 -07:00
Claudiu Lodromanean
b018cdc037
Update legacy coupon class with new date handline
2017-03-13 15:05:57 -07:00
Justin Shreve
cd92351dd7
Fix direct property access for coupon amount.
...
In 2.6, you could access the amount via $coupon->coupon_amount. Or legacy code incorrectly handles $coupon->amount instead. 7778583340/includes/class-wc-coupon.php (L102)
This PR handles both since the RCs and betas allowed `->amount` and I don't want to break anything that may be accessing it that way..
To Test:
* `phpunit --filter=test_coupon_backwards_compat_props_use_correct_getters`
2017-03-09 10:34:45 -08:00
Mike Jolley
d7dfdd3d10
Wrap all deprecation calls.
2016-11-23 16:15:00 +00:00
Krzysztof Grabania
4711066490
Removed empty string param in _deprecated_function function ( #12301 )
...
`_deprecated_function` has conditional which is checking if third param (replacement) is null. Passing replacement as empty string to this function will fail this test and the end of triggered error will look like this: `Use instead.` instead of `with no alternative available.`. This PR removes all occurrences of empty strings in this function.
2016-11-10 10:17:32 +00:00
Justin Shreve
b41626c555
Implement Coupon Data Store ( #12280 )
...
* Implement a Coupon Data Store using CPTs..
* Handle PR feedback.
2016-11-09 12:21:18 +00:00
Mike Jolley
402d0ff077
Merge branch 'master' into pr/11797
...
# Conflicts:
# includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
# includes/api/class-wc-rest-coupons-controller.php
# includes/class-wc-coupon.php
# tests/unit-tests/api/coupons.php
# tests/unit-tests/coupon/crud.php
2016-09-01 11:43:31 +01:00
Aristeides Stathopoulos
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
82f3cc221e
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos
17961f6484
WordPress.Arrays.ArrayDeclaration.ValueNoNewline
2016-08-27 06:04:10 +03:00
Mike Jolley
ed01282340
Made data match schema
2016-08-26 15:20:44 +01: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
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
7e97ee94c1
Update deprecated and doing it wrong version numbers
2016-03-17 09:19:28 -07:00
Justin Shreve
69973d520e
Update version strings
2016-03-17 09:19:28 -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