engineer614
Forum Replies Created
-
So I’m running this on a site meant for internal use by me and my employees only so there’s no caching or optimization plugins whatsoever, I will try turning off the standard wordpress caching and see if that helps.
I really don’t have too many plugins on this site either. For the most part I just have BuddyPress, bbPress, AutomatorWP, Gravity Forms and Pods. Couple random plugins but nothing that does anything crazy functionality-wise.
I am running this on an Amazon EC2 server which is a bit different than your average WordPress user. Since I install all the server’s software packages and whatnot myself there’s definitely the possibility that I could be missing a package, although unlikely.
If you want I can make a temporary admin account for you and you can take a look.
Well to make things even weirder check this out.
/* * Function to run when WebHook recieves data */ add_filter( 'wpwhpro/run/actions/custom_action/return_args', 'shiftreport_update_clockout', 10, 3 ); function shiftreport_update_clockout( $return_args, $identifier, $response_body ) { $DebugEnabled = TRUE; if ($DebugEnabled) { echo 'Beginning of Function - '; } echo 'The identifier that was received is: '; echo $identifier; echo ''; /******************************************************* * If the identifier doesn't match, exit the function *******************************************************/ if( $identifier !== 'update_clockout' ){ echo 'Identifier is not valid'; return $return_args; } if ($DebugEnabled) { echo 'Identifier Successfully Validated - '; }‘
?wpwhpro_action=employee-clock-out&wpwhpro_api_key=SECRET&action=custom_action&wpwh_identifier=update_clockout
‘Beginning of Function - The identifier that was received is: update_clockout Identifier is not valid{ "success": true, "msg": "Custom action was successfully fired." }- This reply was modified 5 years, 6 months ago by engineer614.
Weird I’m still occasionally having trouble getting the identifier to work…
?wpwhpro_action=employee-clock-out&wpwhpro_api_key=SECRET&action=custom_action&wpwh_identifier=update_clockout'/*
* Function to run when WebHook recieves data
*/
add_filter( ‘wpwhpro/run/actions/custom_action/return_args’, ‘shiftreport_update_clockout’, 10, 3 );
function shiftreport_update_clockout( $return_args, $identifier, $response_body ) {$DebugEnabled = TRUE;
if ($DebugEnabled) {
echo ‘Beginning of Function – ‘;
}/*******************************************************
* If the identifier doesn’t match, exit the function
*******************************************************/
if( $identifier !== ‘update_clockout’ ){
echo ‘Identifier is not valid’;
return $return_args;
}if ($DebugEnabled) {
echo ‘Identifier Successfully Validated – ‘;
}
`
I’m using Postman to send test data to the webhookHere’s a screenshot of the data sent and the response from the webhook
You should consider maybe sprucing up the documentation you have for making a custom extension for WP Webhooks, I’m using it to help make a internal business management site for my startup and I feel as though I’ll eventually have quite a handful of custom actions.
Thank you very much for the help! Main reason I bought the Pro version of your plugin is because of how I’ve seen you respond to people not only here but across the internet.
Keep it up customer satisfaction is key!
What’s the format for the custom string?
`&action=custom_action&wpwh_identifier=”new_shipstation_order”‘
is this correct? what would my identifier be? because I cant get it to work lol