Commit Graph

15 Commits

Author SHA1 Message Date
Peter Fabian 309c48ab0e Deprecated old cache function and replaced it with a new one. 2019-11-28 14:03:57 +01:00
Khan M Rashedun-Naby cb945a8816 Specified where the Exception is coming from 2018-06-25 15:04:49 +06:00
Khan M Rashedun-Naby 21c5dacdb1 @throws PHPDoc Fix 2018-06-25 12:05:42 +06:00
Claudio Sanches 3e07abb219 Fixed update/order-items-functions-phpcs PHPCS violations 2018-03-08 16:13:51 -03:00
Mike Jolley f6b9c57b5b Invalidate by ID 2017-05-30 14:37:16 +01:00
Mike Jolley aacb01d1e7 Merge branch 'pr/13503'
# Conflicts:
#	assets/css/twenty-seventeen.css
#	assets/css/woocommerce-layout.css
#	assets/css/woocommerce-layout.scss
#	assets/css/woocommerce.css
2017-04-27 12:46:05 +01:00
Mihai Grigori 170de188a0 Wrong variable name in \wc_add_order_item 2017-04-19 15:55:49 +03:00
Mike Jolley 887cb8b62c Make wc_add_order_item pass correct values to woocommerce_new_order_item
Fixes #14362
2017-04-17 12:50:27 +01:00
JeroenSormani a29ba23fab Miscellaneous cleanup of typos + change some return types for IDE helpers 2017-03-20 11:03:14 +01: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
Aristeides Stathopoulos 10ffc92a73 Inline control structures are not allowed 2017-03-07 22:24:24 +02:00
Justin Shreve 98343ffe26 Fix docblocks and cast the order ID as int after our query. 2017-01-19 09:38:23 -08:00
Justin Shreve a1446c9591 Add method for getting order id from order item id. 2017-01-19 09:30:19 -08:00
Justin Shreve 9b08f4b32d Move order-item-functions queries to a data store. Rebase & update to use download data store. 2016-11-21 11:38:07 -08:00
Mike Jolley ac3be6ba50 Order stores complete 2016-11-18 14:07:21 +00:00