Extending the woocommerce rest api
问题 I would like to extend the woocommerce rest api to include data of its 'booking' extension plugin. Currently this extension does not have default endpoints provided by the rest api. So far I have created a plugin, and I've added the following code; add_filter( 'woocommerce_rest_prepare_product', 'custom_data'); function custom_data($response, $object) { if( empty( $response->data ) ) return $response; $response->data['meta_data'] = get_post_meta( $object[ID], 'availability', true); return