Suggestion
-
Hi!
What do you think about adding this e-mail option?
[site_reviews_form mailto=”whichever@mail.se”] so when a review is submitted the standard mailnotification is sent to the e-mail added to the shortcode/widget.
-
Have you seen the notification settings?

Yes I have! But let’s say I have a site where you can review companies. Each company is represented on a page with companyinformation and a review form. I’d like them to know when they have a new review. Don’t want to set their user as the author of the page.
Is it possible to do that in anyway?
Thank you for a great plugin and for such a fast answer!
With best regards,
bb
…and all the companies don’t have their own users on the site.A work around wouuld of cource be to create a new user for each company and put that user as author of their page but it’s 100+ companies and I don’t want to add that many unnecessary users to my db.
-
This reply was modified 4 years, 11 months ago by
bba01.
Do these companies have user accounts on your website?
Nope. See edited answer.
In that case, here is a possible solution: https://pastebin.com/j7FDBA5B
To use that snippet, you will also need to:
1. Add a Custom Field
company_emailto your company pages with the email of the company.
2. Use theassigned_postsoption on the submission forms to assign reviews to the company pages.Note that the notification email which is sent will be the one configured in the settings.
That was exactly what I was looking for because that’s how the pages are set up! Thank you thank you thankyou so much!
Have a great day! 🙂
With best regards,
bb
This is what I tried:
add_filter(‘site-reviews/notification/emails’, function ($emails, $review) {
$posts = $review->assigned_posts();
foreach ($posts as $post) {
$email = get_post_meta($post->ID, ‘bb_epost’, true);
if (is_email($email)) {
$emails[] = $email;
}
}
return $emails;
}, 10, 2);The custom field name is bb_epost . Can’t get it to work. I’ve tried with both the Elementor widget and the shortcode widget to display the review form with [site_reviews_form assigned_posts=”post_id”]
Send to author of the page that the review is assigned to is checked.
The page has an e-mail address assigned to the bb_epost field.
Am I missing some setting?
With best regards,
bb
-
This reply was modified 4 years, 11 months ago by
bba01.
There was a typo in the snippet. Please try again.
Also this snippet gets the company email from the post meta, so you don’t need to enable the send to the author of the page checkbox in the settings.
-
This reply was modified 4 years, 11 months ago by
Gemini Labs.
Hi again and thank you for your time!
Works like a charm! Thank you so much for your time and effort!
I found an interesting issue when adding the review to a widget that shows on a users resumes. The link in the mail sent to the user looks like this:
https://www.my.site/wp-admin/post.php?post=8877&action=editbut in the site review backend it’s assigned to the right URL which is:
https://www.my.site/cv/bb-4yrfz71f64-specialist/The shortcodes are added in HTML-blocks with assigned_posts=”post_id”.
Have you heard of this issue?
With best regards,
bb
Yes, that is correct since reviews do not have a public permalink. The URL links to the Edit Review page in the admin.
To remove this from the notification, delete the {review_link} tag in the notification template settings.
-
This reply was modified 4 years, 11 months ago by
The topic ‘Suggestion’ is closed to new replies.