Claudio Sanches
27e4288eab
Merge pull request #27934 from woocommerce/remove_get_product_from_item
...
Remove the remaining uses of $order->get_product_from_item()
2020-10-14 16:18:29 -03:00
Claudio Sanches
7d1ff1a655
Merge pull request #27310 from woocommerce/fix/27215
...
Fix deleting a tax class via WP CLI.
2020-10-14 14:00:33 -03:00
Ron Rennick
8ec54fabe0
phpcs fixes
2020-10-14 10:27:58 -03:00
Ron Rennick
cd20044b13
Merge branch 'master' into fix/27215
2020-10-14 10:16:36 -03:00
vedanshujain
c01f32a390
Use default value if formatted value is not available
2020-10-14 14:51:19 +05:30
vedanshujain
8e12de5d3c
Merge branch 'fix/api/229-unit-test' of https://github.com/shiki/woocommerce into fix/api/229
2020-10-14 13:53:03 +05:30
Claudio Sanches
e655b44717
Fixed coding standards
2020-10-13 22:32:32 +05:30
Shiki
2e165e7558
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-10-13 22:32:31 +05:30
Shiki
a3f46e5526
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-10-13 22:32:30 +05:30
Shiki
b9ae830da5
Fix formatting in Orders V2 unit test
2020-10-13 22:32:30 +05:30
Shiki
f45e8b884b
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-10-13 22:32:30 +05:30
Shiki
2e92460df2
Orders V3: Include display_key and display_value in item meta_data
2020-10-13 22:32:30 +05:30
Shiki
d8ac282c80
Orders V3 Schema: Add display_key and display_value for meta props
2020-10-13 22:32:29 +05:30
James Allan
1fcedb5279
Removes the remaining uses of $order->get_product_from_item
2020-10-13 11:24:48 +10:00
Rodrigo Primo
0771138604
Merge pull request #27707 from dd32/php8/warnings
...
PHP8 Warning: Change __wakeup() to a public method
2020-10-08 10:01:21 -03:00
Néstor Soriano
ab529835fa
Merge pull request #27840 from woocommerce/php8/fix-required-parameters-after-optional
...
[PHP 8] Convert optional-before-required parameters into required parameters
2020-10-08 14:22:52 +02:00
Ron Rennick
24ec59cf26
fix merge conflict
2020-10-07 15:19:05 -03:00
Ron Rennick
ab4a46e32e
Merge pull request #27299 from woocommerce/fix/27116
...
allow variation image to be removed via REST API
2020-10-05 09:33:50 -03:00
Nestor Soriano
7485b9165f
Convert optional-before-required arguments to required.
...
In PHP 8 required parameters after optional parameters in
function/method signatures trigger a deprecation notice. These type
of parameters are pointless since a value needs to always be
provided for them anyway, so they are actually de-facto required.
This commit converts all these not-so-optional parameters into
truly required parameters by removing their default values.
2020-10-02 09:45:09 +02:00
Nestor Soriano
53d33457e3
Fix code style/sniffer errors in a few files.
2020-10-02 09:34:09 +02:00
Dion Hulse
9440ec3570
Change __wakeup() to a public method to avoid PHP8 warning.
2020-09-18 07:55:26 +00:00
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