I am working with Gravity Forms and the Webhooks Add-on, but those may or may not be relevant to my question.
If I have an action defined with a hook in my functions.php file, is there an easy way of triggering it manually without the actual hook happening (for debugging)?
To elaborate: I have a webhook to a 3rd party server setup with a Gravity Form. However, I am having two problems with it. The first is that I'm getting a cuRL error 60 which I have a request to DreamHost to resolve. The second is that the webhooks don't trigger when I want them to (when a callback for a Stripe/PayPal payment marks an entry as complete). I've added this code to my functions.php file:
add_action( 'gform_post_payment_completed', function ( $form, $entry_id ) {
if ( function_exists( 'gf_webhooks' ) ) {
$entry = GFAPI::get_entry( $entry_id );
gf_webhooks()->maybe_process_feed( $entry, $form );
gf_feed_processor()->save()->dispatch();
}
}, 10, 2 );
So, in trying to test/debug this, how can I trigger this action without 'gform_post_payment_completed' being called?