Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created February 25, 2019 18:50
Show Gist options
  • Save Shelob9/aff5f0a6b4a0b289fa6f76ae622d6516 to your computer and use it in GitHub Desktop.
Save Shelob9/aff5f0a6b4a0b289fa6f76ae622d6516 to your computer and use it in GitHub Desktop.
<?php
//Add email data to entry api response
add_filter( 'caldera_forms_api_entry_data', function ($data,\Caldera_Forms_Entry $entry){
$form = $entry->get_form();
$mailData = ( new \calderawp\WordPressPlugin\MailData($entry->get_entry_id(), $form ) )->getEmailData();
$data[ 'mailData'] = $mailData;
return $data;
},10,2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment