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;
- }
- $customFieldNames = [
- 'palatability',
- 'viscosity',
- 'effectiveness',
- 'price_quality_ratio',
- 'advice',
- ];
- 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