I have the latest woocommerce plugin, and I have to set a webhook to one of my URL. But I am not able to read it in my $_REQUEST and nor in $input = file_get_contents(
$input = file_get_contents(
$webhookContent = ""; $webhook = fopen('php://input' , 'rb'); while (!feof($webhook)) { $webhookContent .= fread($webhook, 4096); } fclose($webhook); mail('mail@yourdomain.com', 'test - hook', $webhookContent);
This is all it took. It will send all the body to your email