Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaehlers/216b637da610cb4b45c75c2df0718ce2 to your computer and use it in GitHub Desktop.
Save rafaehlers/216b637da610cb4b45c75c2df0718ce2 to your computer and use it in GitHub Desktop.
Trigger WebHook feeds on your form when editing an entry in GravityView
<?php // DO NOT COPY THIS LINE
add_action( 'gravityview/edit_entry/after_update', 'gravityview_trigger_webhooks_feed', 10, 3 );
function gravityview_trigger_webhooks_feed( $form = array(), $entry_id = array(), $object ) {
if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID
return;
}
add_filter( 'gform_is_feed_asynchronous', '__return_false', 1294873 );
$GF_Webhooks = GF_Webhooks::get_instance();
$GF_Webhooks->maybe_process_feed( $object->entry, $form );
remove_filter( 'gform_is_feed_asynchronous', '__return_false', 1294873 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment