Commit Graph

13 Commits

Author SHA1 Message Date
Peter Fabian b48a389264 Add support for low stock amount to REST API v3. Ref #27371. 2021-03-11 16:21:43 +01:00
vedanshujain 27b22d3aaa Move the logic to set stock_status from V2 to V3. 2021-01-06 17:55:56 +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
vedanshujain 80f5d35311 Apply coding standards w.r.t PR #28677 2021-01-05 13:47:16 +05:30
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 04f948951a Fetch product attrs only when needed 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 2e65b8cec4 Fetch expensive fields only when required for performance 2020-12-18 14:40:20 +05:30
Claudio Sanches 70c7adfeb7 Fixed usage of package tag in REST API and templates 2020-09-17 11:56:08 -03:00
vedanshujain 083e529668 Revert "Fix compatibility for WP 5.5"
This reverts commit cc96f6bbd1.
2020-08-12 19:31:40 +05:30
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