Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add a custom redirect if rating is greater than 3
- * @param string $redirect
- * @param \GeminiLabs\SiteReviews\Commands\CreateReview
- * @return string
- */
- add_filter('site-reviews/review/redirect', function ($redirect, $command) {
- if ($command->rating > 3) {
- return 'https://google.com/';
- }
- return $redirect;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement