Script injection in Woocommerce API response
-
Hello,
I have a problem with the Matomo plugin. This one injects a js script in the response of my API calls (notably for the update of an order in “processing”).
After invesstigation, it’s line 72 of plugins/matomo/classes/WpMatomo/Ecommerce/Woocommerce.php that injects this code.As a result, the response does not have a valid JSON format, and an error is raised.
Do you know where the problem comes from and how to solve it?
Here’s an example of the injected code:
<scripttype="text/javascript">/*<![ CDATA[ */window._paq=window._paq||[];window._paq.push([ "addEcommerceItem", "sub_month", "Abonnement avec variations", [ "Uncategorized" ], 8.33, 1 ]);window._paq=window._paq||[];window._paq.push([ "trackEcommerceOrder", "2825", "9.99", 8.33, "1.665", "0", 0 ]);/* ] ]>*/</script>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Script injection in Woocommerce API response’ is closed to new replies.