Created
May 4, 2017 18:43
-
-
Save zackkatz/a9986eaef97cb8e4ebd7f07fdf36cf49 to your computer and use it in GitHub Desktop.
Gravity Forms Import Entries - Send notifications for each imported entry
This file contains hidden or 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 | |
add_action( 'gform_post_add_entry', 'gv_import_entry_send_notifications', 10, 2 ); | |
/** | |
* Send notifications | |
* | |
* @param $entry | |
* @param $form | |
*/ | |
function gv_import_entry_send_notifications( $entry, $form ) { | |
// Only trigger notifications on the Import Entry screen | |
if ( did_action( 'gravityview-importer/add-hooks' ) ) { | |
GFCommon::send_form_submission_notifications( $form, $entry ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment