Cant handle incoming webhook
-
Hi there,
I recently installed the pro version and I set up a webhook for recieve data from a third party platform
Then problem is when I tried to hook into the action it seems its not working
This is my code
add_filter( ‘wpwhpro/run/actions/custom_action/return_args’, ‘wpwh_fire_my_custom_logic’, 10, 3 );
function wpwh_fire_my_custom_logic( $return_args, $identifier, $response_body ){$data=json_decode($response_body,true);//also tried without the json decode
$body=$data[“payload”][“object”];
$correo=$body[“email”];
my_custom_function($correo);
wp_mail( “[email protected]”,”Prueba hook”, “Prueba”);return $return_args;
I decided to activate logs and see what I recieved, it looks like this
{
event: “user.invitation_accepted”,
payload: {
account_id: “YZwvfZtWSXq4diaCRhQPKQ”,
object: {
id: “04O-zwtsR9Cdb56s4kzPtA”,
first_name: “Shannon”,
last_name: “Chada”,
email: “[email protected]”,
type: 2
}
},
event_ts: 1610135940479
}The page I need help with: [log in to see the link]
- The topic ‘Cant handle incoming webhook’ is closed to new replies.