9724b67ab8
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. |
||
---|---|---|
.. | ||
functions.php |