Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zackkatz/a9986eaef97cb8e4ebd7f07fdf36cf49 to your computer and use it in GitHub Desktop.
Save zackkatz/a9986eaef97cb8e4ebd7f07fdf36cf49 to your computer and use it in GitHub Desktop.
Gravity Forms Import Entries - Send notifications for each imported entry
<?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