Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function __construct() {
- // Stop any PDFs from being immediately generated (require Gravity Forms Delayed Email Notifications)
- add_filter( 'gfpdf_maybe_attach_to_notification', array( $this, 'require_delayed_notifications' ), 10, 5 );
- }
- public function require_delayed_notifications( $attach, $notification, $settings, $entry, $form ) {
- // Disable Gravity PDF attachment if the notification has a flag (__AFTER_DELAY_FLAG__) letting us know that this notification is supposed to wait until after the delay
- if ( preg_match( '/__AFTER_DELAY_FLAG__/', $notification['subject'] ) ) {
- return false;
- }
- return $attach;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement