Adding custom address fields to WC REST API
-
Hey,
I’m trying to add custom fields (registered bywoocommerce_default_address_fieldsfilter) 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_addressesmethod inincludes/legacy/api/v2/class-wc-api-orders.phpto set order’s billing/shipping addresses but there is no way to manipulate this function. It’s required to extendWC_Orderclass 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.
The topic ‘Adding custom address fields to WC REST API’ is closed to new replies.