Advertisement
geminilabs

[site-reviews[ send notifications to assigned users

Mar 12th, 2022
1,938
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. /**
  2.  * @param array $emails
  3.  * @param \GeminiLabs\SiteReviews\Review $review
  4.  * @return array
  5.  */
  6. add_filter('site-reviews/notification/emails', function ($emails, $review) {
  7.     foreach($review->assignedUsers() as $user) {
  8.         $emails[] = $user->user_email;
  9.     }
  10.     return $emails;
  11. }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement