Need to forward Data from WooCommerce Webhook sent to same site WordPress REST API custom endpoint

I figured out it could be an Authorization problem, then I looked the WooCommerce webhook functions and fount where the delivery is executed: /wp-content/plugins/woocommerce/includes/class-wc-webhook.php I hard coded my Authorization header after line # 303 in the deliver() function: ‘headers’ => array( ‘Content-Type’ => ‘application/json’, ‘Authorization’ => ‘Basic bmNkaWgdrGFsOiNIb25kdXJhczIwMThTUFMh’, ), Now I need to calculate the … Read more

Can’t access 3rd party API, code works on local server but not on wordpress

Can you drop this in and let us know what $content looks like? <?php $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, “A WORKING API”); $content = curl_exec($c); curl_close($c); echo ‘<pre>’; print_r($content); echo ‘</pre>’; I am curious if this is a WordPress issue or just a CORS issue with the call being made from a … Read more