Commit Graph

74 Commits

Author SHA1 Message Date
Claudio Sanches 70c7adfeb7 Fixed usage of package tag in REST API and templates 2020-09-17 11:56:08 -03:00
Shiki ac4cba3fab Orders API: Fix regression in `meta_data` `display_*` values
Previously, we were using the `$formatted_meta_data` to build the final array.
However, this does not consider the fact that
`WC_Order_Item->get_formatted_meta_data` can exclude `meta_data` from the
result. There would be less `meta_data` objects return than the previous
implementation.

This fixes the issue by using the `$data['meta_data']` value as the main list of
meta data and only using `$formatted_meta_data` to optionally apply the
`display_key` and `display_value` properties.
2020-09-01 14:38:28 -06:00
Shiki 398076627a Orders API: Fix mismatched domain error 2020-09-01 14:37:55 -06:00
Ron Rennick 1ae1b3e4e6 Merge branch 'master' into fix/27215 2020-08-28 11:38:37 -03:00
Shiki 2e366ef76b Orders: Make display_key and _value meta available for v3 and v3
This resolves the intentionally failing
WC_Tests_API_Orders_V2::test_get_item_with_line_items_meta_data.
2020-08-26 23:46:07 +05:30
Shiki 35ed2df4fb Schema: Make display_key and *_value available for v3 and v2
This is just the schema and the actual functionality isn't implemented yet.
2020-08-26 23:46:07 +05:30
Shiki 5ab863e649 Fix formatting in Orders V2 unit test 2020-08-26 23:46:07 +05:30
Shiki 9678a286e3 Orders V3: Reuse WC_Order_Item->get_formatted_meta_data
Previously, I was using my own function. This time, we're using the function
available in WC_Order_Item but sanitizing the results after.
2020-08-26 23:46:07 +05:30
Shiki ea63d5aaf9 Orders V3: Include display_key and display_value in item meta_data 2020-08-26 23:46:07 +05:30
Shiki 90d5a8e7e9 Orders V3 Schema: Add display_key and display_value for meta props 2020-08-26 23:46:07 +05:30
Ron Rennick 2fd12604ef move update to v2 controller 2020-08-13 09:32:01 -03:00
vedanshujain 4b1ebea800 Also allow null for date-time for BW 2020-08-13 16:49:44 +05:30
vedanshujain 3dd508fd35 Address review comments 2020-08-13 16:36:27 +05:30
vedanshujain a4691dc3f3 Set type to mixed to be compatible with 5.4.
This prop was missed in an earlier commit.
2020-08-13 15:47:18 +05:30
vedanshujain 5c0be2a715 Give preference to null data-type over others 2020-08-13 14:17:48 +05:30
vedanshujain 147c9baf4f Change `mixed` data type to composite for compatibility with 5.5 2020-08-13 13:30:39 +05:30
Ron Rennick 71def437f7 phpcs fixes 2020-08-12 14:34:57 -03:00
vedanshujain 083e529668 Revert "Fix compatibility for WP 5.5"
This reverts commit cc96f6bbd1.
2020-08-12 19:31:40 +05:30
Ron Rennick c605b93737 add get single tax class, support cli tax class delete 2020-08-11 17:34:46 -03:00
Ron Rennick 22867c41c1 phpcs fixes 2020-08-11 15:51:38 -03:00
Ron Rennick 78c2a07306 allow variation image to be removed via REST API 2020-08-11 15:44:03 -03:00
vedanshujain 1966b0ba9a Changed textdomain since API is merged into core now. 2020-08-06 18:18:18 +05:30
vedanshujain cc96f6bbd1 Fix compatibility for WP 5.5 2020-08-06 14:34:03 +05:30
vedanshujain 55a9687e6d Make api included structure more linear. 2020-08-06 14:34:02 +05:30