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

Showing how many times is plugin activated or deactivated

Although you might have already managed to solve the problem you faced, here’s few thoughts. You could use register_activation_hook(), register_deactivation_hook() and register_uninstall_hook() functions to trigger a wp_remote_post() call to your (custom) API endpoint to count the times when your plugin is activated, deactivated or deleted. If the recieving site, where you keep track of the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)