How can i set path parameters for a webhook?
-
Closed. This question is off-topic. It is not currently accepting answers.
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes.Closed 2 hours ago.
(Private feedback for you)
I’m using webhooks for a plugin developpement, and i struggle to get back data when the external Api call the hook. I have tried using the $_GET provided by the webhook function but it is empty. Is there any tips to set a path parameter for my webhook ?
My webhook initialisation :
add_action( 'woocommerce_api_confirmedPayement', array( $this, 'webhook' ) );
My webhook function :public function webhook() { // $_GET['id'] returns nothing $order = wc_get_order( $_GET['id'] ); $order->payment_complete(); $order->reduce_order_stock(); update_option('webhook_debug', $_GET); }
Thanks !
- The topic ‘How can i set path parameters for a webhook?’ is closed to new replies.