Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This snippet make a {membership_info} tag available in email notifications
- *
- * @param array $args
- * @param \GeminiLabs\SiteReviews\Modules\Email|\GeminiLabs\SiteReviews\Addon\Notifications\Email $email
- * @return array
- */
- add_filter('site-reviews/email/compose', function ($args, $email) {
- $review = glsr()->args($email->data)->review;
- if (empty($review)) {
- return $args;
- }
- if ($user = $review->user()) {
- $membership = ''; // TODO: put the user's membership info here as a string
- $args['template-tags']['membership_info'] = $membership;
- }
- return $args;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement