Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter marlondc

    (@marlondc)

    Hi Richard,

    Thanks for your reply and advice. It does seem that the result of the endpoint is not correct json.

    I am making a WC_Product_Query to get the products

    I then use this function to get the data Coast_WC_REST_Products_Controller->prepare_object_for_response to get the data. I then return that.

    I have seen that WC_Meta_Data classes exist in that data. What I have done is I jsonSerialize to convert into valid JSON.

    Is this the correct method or is there a WP function to unserialize it for me. I understand this is probably out of scope for this forum.

Viewing 1 replies (of 1 total)