Mike Jolley
2894d5aab0
Make needs_processing public so the data store can access.
2017-03-10 12:21:42 +00:00
Mike Jolley
90b588be18
Merge branch 'master' into tests-13533
2017-03-10 12:01:41 +00:00
Mike Jolley
e2552c0a8c
Unit tests
2017-03-10 12:01:40 +00:00
Mike Jolley
2da794d817
Merge branch 'master' into tests-13533
2017-03-10 11:47:39 +00:00
Mike Jolley
4f1c433fbf
Merge pull request #13532 from woocommerce/fix/order-item-meta-cache
...
Fix order item meta functions cache busting.
2017-03-10 11:47:26 +00:00
Mike Jolley
c162415fac
Merge pull request #13538 from woocommerce/customers-created-modified-date
...
Apply WC_DateTime to WC_Customer
2017-03-10 10:48:46 +00:00
Mike Jolley
58e4e318b0
Merge pull request #13537 from woocommerce/fix-13534
...
Use WordPress wp_get_password_hint() function to display passowd hint
2017-03-10 10:43:23 +00:00
Claudio Sanches
dbbe4617ee
Do not force integer since will be saved as string by WordPress
2017-03-10 01:58:57 -03:00
Claudio Sanches
948963f5c7
Uses GMT/UTC+0 when update customer lastt_update
2017-03-10 01:57:53 -03:00
Claudio Sanches
23b575aebe
Fixed customer CRUD unit tests
2017-03-10 01:53:06 -03:00
Claudio Sanches
4f1577fb27
Added support new WC_DateTime in WC_Customer
2017-03-10 01:20:33 -03:00
Claudio Sanches
377fbf9c44
Use WordPress wp_get_password_hint() function to display passowd hint
...
Closes #13534
2017-03-10 00:48:19 -03:00
Justin Shreve
9724b67ab8
Fix order item meta functions cache busting.
...
The cache busting currently in `wc_add_order_item_meta`, `wc_update_order_item_meta`, and `wc_delete_order_item_meta` doesn't actually bust anything. The cache line looks like it is from 2.6. The relevent cache to bust is actually in the `order-items` group and has a different key/prefix.
This bug allows your meta to get out of sync if you use these functions and then try to access a value from a CRUD object.
You can see this in the `test_wc_order_item_meta_functions` test I've added. If you keep your `wc-order-item-functions.php` as is, the asserts against `$item->get_meta` will fail.
To test:
* `phpunit --filter=test_wc_order_item_meta_functions`.
* Try before applying the `wc-order-item-functions.php` changes and after.
2017-03-09 13:36:23 -08:00
Claudiu Lodromanean
6b959e8625
Merge pull request #13531 from woocommerce/fix/legacy-coupon-amount-property
...
Fix direct property access for coupon amount.
2017-03-09 11:47:36 -08: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
99776e6374
Merge pull request #13514 from woocommerce/fix-13509
...
Apply_changes nested array fix and tests
2017-03-09 17:32:19 +00:00
Claudiu Lodromanean
8a18702c27
Just use array_replace_recursive in apply_changes
2017-03-09 09:06:05 -08:00
Claudiu Lodromanean
3aea9a0b2f
DRY out the meta bumping functions
2017-03-09 08:51:47 -08:00
Mike Jolley
6848fad224
Merge branch 'timezone-poc' into fix-13498
2017-03-09 16:10:07 +00:00
Mike Jolley
ac1c2f02b7
syntax
2017-03-09 14:53:52 +00:00
Mike Jolley
28a8d05285
Handle date paid in getter and during save to avoid filters during construct
2017-03-09 14:40:19 +00:00
Mike Jolley
9427eb048d
Set default status in getter, not during contruct.
...
Prevents loops like in Prospress/woocommerce-subscriptions#1902
2017-03-09 13:45:33 +00:00
Mike Jolley
92f989d8ac
Merge pull request #13528 from woocommerce/fix/legacy-get-item-downloads
...
Fix legacy get item downloads
2017-03-09 13:26:54 +00:00
Mike Jolley
a5c10d07c1
Fix is_purchasable (requires save) when price is null
...
Fixes #13043
2017-03-09 13:26:12 +00:00
Boro Sitnikovski
deae95b678
Updates after PR review
2017-03-09 12:55:33 +01:00
Mike Jolley
d811317a1f
Merge pull request #13511 from franticpsyx/fix-price-incl-excl-tax-zero-empty-inputs
...
[2.7] Unexpected wc_get_price_{in/ex}cluding tax behavior with zero/empty inputs
2017-03-09 11:46:39 +00:00
Mike Jolley
a185e57ccb
Admin panel should not hide _ meta.
...
Fixes #13510
2017-03-09 11:45:22 +00:00
Boro Sitnikovski
6c967697d9
Fix legacy get item downloads
2017-03-09 12:41:25 +01:00
Mike Jolley
a598baaf9e
date helper methods
2017-03-09 11:06:36 +00:00
Mike Jolley
09c75cd814
More tests
2017-03-09 11:05:54 +00:00
Mike Jolley
ee713f82cc
Merge pull request #13519 from ragulka/fix-legacy-api
...
Set order id for items & fix fee title sanitazing on legacy API
2017-03-09 09:52:12 +00:00
Illimar Tambek
21a54b93d8
Use wc_clean to sanitize fee title in legacy apis
...
This will bring legacy APIs in line with the new REST API, where the
order item names are sanitized using wc_clean and fix the
backwards-incompatible change of using sanitize_title.
2017-03-09 11:00:35 +02:00
Illimar Tambek
8e81a7e4e0
Set order id for fees & shipping on legacy api
...
If order ID is not set, the item will be created, but will not be
associated with the order being updated.
2017-03-09 10:53:10 +02:00
Claudiu Lodromanean
e36ee46dea
Make increase_usage_count work correctly on concurrent checkoutt
2017-03-08 15:27:37 -08:00
Claudiu Lodromanean
b645fc5513
Docblocks
2017-03-08 12:02:14 -08:00
Claudiu Lodromanean
3b8eb75c93
Better handling of nested arrays in apply_changes
2017-03-08 11:51:38 -08:00
Mike Jolley
94eaa67bc9
to string method
2017-03-08 18:14:37 +00:00
Mike Jolley
b5454f3403
America/New_York unit test
2017-03-08 17:44:43 +00:00
Mike Jolley
dda75c3d43
Unit tests
2017-03-08 16:52:21 +00:00
Mike Jolley
c5e81bdd7c
Include datetime class
2017-03-08 16:51:55 +00:00
Mike Jolley
a490b85d3e
Handle saves
2017-03-08 16:51:46 +00:00
Mike Jolley
46416a7e36
WC_DateTime wrapper class
2017-03-08 16:51:35 +00:00
Mike Jolley
165cdca92b
Display date in admin using offset
2017-03-08 16:51:22 +00:00
Mike Jolley
c7dc8ae2b4
date_created and date_modified getters and setters
2017-03-08 16:51:10 +00:00
Mike Jolley
1a9c49db25
set_date_prop helper to convert dates in setters
2017-03-08 16:50:38 +00:00
Manos Psychogyiopoulos
5e8df27945
fix wc_get_price_{in/ex}cluding tax behavior with zero/empty inputs
2017-03-08 18:21:36 +02:00
Mike Jolley
62240c6bbd
Merge pull request #13507 from woocommerce/fix-13506
...
Validate the parent order ID by calling wc_get_order()
2017-03-08 16:05:17 +00:00
Michael Pretty
6150ee2fde
Validate the parent order ID by calling wc_get_order() instead of get_post()
2017-03-08 08:02:18 -05:00
Mike Jolley
c9cfad18ef
Merge pull request #13501 from woocommerce/fix-13480
...
Improve individual use coupon handling
2017-03-08 10:09:45 +00:00
Claudiu Lodromanean
28f8380ab6
Sprinkle some periods
2017-03-07 15:00:14 -08:00