Advertisement
geminilabs

Untitled

Jan 4th, 2023
1,422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. /**
  2.  * How to add notification tags for your custom fields
  3.  *
  4.  * @param array $data
  5.  * @param \GeminiLabs\SiteReviews\Modules\Email $email
  6.  * @return array
  7.  */
  8. add_filter('site-reviews/email/compose', function ($data, $email) {
  9.     $review = glsr_get($email, 'data.review');
  10.     if ($review) {
  11.         $data['template-tags']['custom_telephone'] = $review->custom->telephone;
  12.         $data['template-tags']['custom_state_county'] = $review->custom->state_county;
  13.     }
  14.     return $data;
  15. }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement