0

I'm trying to connect to one of our costumers that runs a Woorcommerce site, for receiving the product list. The product list is returned but the string also includes to php notice and a warning saying:

"Warning: Cannot modify header information - headers already sent by...".

The notice is produced in some WC/WP plugin that I do not care about, need or have access to modify. I make my call through PHP cURL, so my question is if it is possible to set any curl options to avoid this notifications or is the only way a modification of the plugin on the site?

Suggestions using other methods than curl is also welcome.

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

0

The main reason is that you have already sent HTML to clients. header(); must be before html (echo) or something.

Check other questions about this error. It's very frequent.

Kristiyan
  • 1,655
  • 14
  • 17