Created
June 19, 2017 19:09
-
-
Save zackkatz/1818388466f2b636030452ab0b8d707f to your computer and use it in GitHub Desktop.
GravityView - Trigger the `gform_after_submission` action when an entry is edited. This adds support for the Gravity Forms Zapier addon, for example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* GravityView doesn't trigger the `gform_after_submission` action when editing entries. This does that. | |
* | |
* @param array $form | |
* @param int $entry_id ID of the entry being updated | |
* @param GravityView_Edit_Entry_Render $object | |
* | |
* @return void | |
*/ | |
function gravityview_trigger_gform_after_submission( $form = array(), $entry_id = array(), $object ) { | |
gf_do_action( array( 'gform_after_submission', $form['id'] ), $object->entry, $form ); | |
} | |
add_action( 'gravityview/edit_entry/after_update', 'gravityview_trigger_gform_after_submission', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment