woocommerce / woocommerce-rest-api

This is the WooCommerce core REST API Package. It runs standalone as a feature plugin too.
70 stars 46 forks source link

Unexpected characters at Get Orders REST API response #291

Closed AnoopKumar29 closed 6 months ago

AnoopKumar29 commented 6 months ago

Hi Team,

While making a REST API call for Get Orders, it returns a JSON response containing invalid characters along with the actual response.

Request: Page: "/wp-json/wc/v2/orders". Query String: "modified_after=2024-05-27 03:48:51.959373&filter[meta]=true&per_page=100&status=processing"

Response: q[{"id":123456,"parent_id":0,"status":"processing".....]

In some cases, we have seen HTML tags being appended just before the response. Found one similar issue https://github.com/woocommerce/woocommerce-rest-api/issues/49 but didn't see any solution provided for that yet.

Please help.

rrennick commented 6 months ago

q[{"id":123456,"parent_id":0,"status":"processing".....]

Plugins and custom code can inject output into REST responses. Use this troubleshooting guide to find the source of the extra content.