Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @param array $data
- * @param \GeminiLabs\SiteReviews\Modules\Email $email
- * @return array
- */
- add_filter('site-reviews/email/compose', function ($data, $email) {
- if (!isset($email->data['review'])) {
- return $data;
- }
- // Any custom field names added here will be available in your notifications templates:
- // For example: A field name of 'custom_field_name' will be available as {{ custom_field_name }}
- $customFieldNames = [
- // 'custom_field_name',
- ];
- foreach ($customFieldNames as $tag) {
- $data['template-tags'][$tag] = $email->data['review']->custom->get($tag);
- }
- return $data;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement