Adding custom address fields to WC REST API
-
Hey,
I’m trying to add custom fields (registered bywoocommerce_default_address_fields
filter) to WC REST API orders. I tried lots of hooks and actions but never worked. The problem is when an order created by API, it firesset_order_addresses
method inincludes/legacy/api/v2/class-wc-api-orders.php
to set order’s billing/shipping addresses but there is no way to manipulate this function. It’s required to extendWC_Order
class to write extra functions likeget_shipping_latitude
,get_shipping_longitude
. Is there any other way to register custom address fields to REST API? Thanks in advance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding custom address fields to WC REST API’ is closed to new replies.