As you can see I am testing the app thoroughly before releasing it, sorry for harassing you.
As stated in the title : I (as admin) don’t get notified by email when a new review is posted.
Yes, the red dot is there in the back office, showing that a comment awaits to be moderated :
as set up in the reviews section of HivePress > Settings :
Yes, there are no such emails for admins yet, as the review emails were released in the latest version, but we plan to add them in future updates. As a workaround, we can provide you with PHP snippets to add such an email. Let me know if this works for you.
add_action('hivepress/v1/models/review/create', function($email){
wp_mail(get_option('admin_email'), 'A review needs to be approved', $email->get_body());
}
);
Please check if the function is called at all using error_log, you can also check the PHP error logs - this hook passes the $review_id instead of $email so there may be a PHP error when $email->get_body() is called.
add_action('hivepress/v1/models/review/create', function($email){
error_log($email);
wp_mail(get_option('admin_email'), 'A review needs to be approved', 'blank content');
}
);
Actually I don’t need to know the content of the review, as it needs to be moderated. All I wished was to be notified, as for other entities (new user registration, request, listings…).
And yes, the error_log just returns a number, matching the review ID.