Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * How to add notification tags for your custom fields
- *
- * @param array $data
- * @param \GeminiLabs\SiteReviews\Modules\Email $email
- * @return array
- */
- add_filter('site-reviews/email/compose', function ($data, $email) {
- $review = glsr_get($email, 'data.review');
- if ($review) {
- // Here you can add your own notification tags to $data['template-tags']
- // $review->custom contains all of your submitted custom field values
- // In the following example, the new notification tag is: {your_custom_tag}
- $data['template-tags']['your_custom_tag'] = $review->custom->your_custom_field_name;
- }
- return $data;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement