barryhughes
24e0191dc7
Throw a 400 error if a coupon item ID (readonly) is posted/put during an order update | #27290
2021-02-16 09:59:03 -08:00
Claudio Sanches
ea54d5ad5f
Merge pull request #28679 from woocommerce/fix/woocommerce-gutenberg-products-block-issues-3565
...
Show correct WooCommerce pages status if they are using blocks vs shortcode.
2021-01-18 19:26:34 -03:00
budzanowski
f9cbc0ccac
Remove filters that we don't need yet.
2021-01-14 10:24:39 +01:00
vedanshujain
f8bcf6271d
Revert order and product controllers to use WP Post queries directly.
...
This commit revert some of the changes added in #27735 because wc_get_products and wc_get_orders is not fully compitable with API controller queries. Since we are close to release 4.9, its better to revert and fix them properly then rush a fix. This undones some the performance improvements we acheived in 27735, in favor of more stability, hopefully we will be able to restore this soon.
2021-01-07 16:47:54 +05:30
budzanowski
1cf09eb063
Simplify.
2021-01-06 15:30:13 +01:00
budzanowski
d5babd800a
Review refactor.
2021-01-06 15:28:51 +01:00
vedanshujain
27b22d3aaa
Move the logic to set stock_status from V2 to V3.
2021-01-06 17:55:56 +05:30
budzanowski
29837c42ff
Refactor.
2021-01-06 11:33:28 +01:00
vedanshujain
2ae6c5b543
Also fetch dependencies for fields which are computed from other fields.
2021-01-06 15:09:50 +05:30
vedanshujain
0d43aecebd
Also fetch in_stock when stock_status requested in V2.
...
When called from V3, controller calls V2s get_product_data method, where stock_status was did not existed and was renamed. In V3 controller, we compute it based on V2 in_stock field.
2021-01-06 14:14:59 +05:30
budzanowski
325f72afe1
Merge branch 'master' into fix/woocommerce-gutenberg-products-block-issues-3565
2021-01-06 09:01:17 +01:00
jonathansadowski
1e267980e8
Merge pull request #28723 from woocommerce/feature/issue-27208
...
Feature/issue 27208
2021-01-05 14:00:55 -06:00
roykho
b25f01d2f3
Add unit tests
2021-01-05 08:14:39 -08:00
vedanshujain
3a7e3fda34
Use `!empty` for consistency with other usages.
2021-01-05 16:37:39 +05:30
vedanshujain
80f5d35311
Apply coding standards w.r.t PR #28677
2021-01-05 13:47:16 +05:30
roykho
7b091485a2
Create product tags if they don't exists closes #27208
2021-01-04 14:59:28 -08:00
budzanowski
c81df313b2
Add block information for woocommerce pages report.
2020-12-28 16:19:51 +01:00
vedanshujain
818e24d5c5
Add protection around `func_get_arg` method for backward compatibility.
...
We are using func_get_arg method to receive argument in a backward compatible way since we cannot modify function signature to add more params even with default params. Earlier I was hoping to use DI to create another child class with modified signature and load it depending upon where we are executing from, however since we had to revert DI, we add this workaround to unblock #27735 .
2020-12-28 14:10:22 +05:30
vedanshujain
934b10fb8c
Use wc_get_orders for consistency intead of custom query
2020-12-18 14:40:20 +05:30
vedanshujain
089994c618
Dont fetch optional fields unless asked to improve performance
2020-12-18 14:40:20 +05:30
vedanshujain
04f948951a
Fetch product attrs only when needed
2020-12-18 14:40:20 +05:30
vedanshujain
13bee82ed9
Cover missed cases
2020-12-18 14:40:20 +05:30
vedanshujain
54dd5550e5
Pass request in backward compatible way
2020-12-18 14:40:20 +05:30
vedanshujain
e62169a4b5
Cache return fields for perfromance
2020-12-18 14:40:20 +05:30
vedanshujain
2e65b8cec4
Fetch expensive fields only when required for performance
2020-12-18 14:40:20 +05:30
Claudio Sanches
e8b2a9adab
Display *-product_<cat|tag> template overrides in Status page
2020-11-23 20:12:38 -03:00
Vedanshu Jain
ae163eb28b
Merge pull request #27734 from woocommerce/enhancement/optimize-wc-order
...
Optimize function `wc_get_orders` by priming caches beforehand
2020-11-14 12:37:44 +05:30
vedanshujain
62ae94d93e
Add shipping, tax and fee lines to refund response for better information.
2020-11-11 18:47:48 +05:30
vedanshujain
a5fb3178f0
Drop CacheHydration class and do it directly.
...
Primary reason for dropping the cache hydration is that seems like we can acheive the same results without it, so no need to add this additional complexity to our code.
2020-11-10 14:23:43 +05:30
Shiki
94ecfcab34
Orders API: Add parent_name to schema
2020-10-26 13:28:04 -03:00
Shiki
48d595ed71
Orders API: Reorganize and place parent_name in a separate section
2020-10-26 13:28:04 -03:00
Shiki
52739ba9ee
Orders API: Add parent_name to line_items for variable products
2020-10-26 13:28:04 -03:00
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
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