There is no specific hook for this, however here is a workaround that should work:
1. Add an “api” parameter to the POST request and give it a value of true.
2. Use the “site-reviews/review/created” hook and check for the “api” parameter in the request. If it exists, then send the notification.
add_action('site-reviews/review/created', function ($review, $command) {
if (wp_validate_boolean($command->request->api)) {
glsr('Modules\Notification')->send($review);
}
}, 10, 2);
If you have configured Slack notifications in the Site Reviews settings, then this will trigger the Slack notification.
-
This reply was modified 3 years, 3 months ago by Gemini Labs.