Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Purge the WP-Optimize cache for the page after a review has been created.
- * Paste this in your active theme's functions.php file.
- * @param \GeminiLabs\SiteReviews\Review $review
- * @param \GeminiLabs\SiteReviews\Commands\CreateReview $command
- * @return void
- */
- add_action('site-reviews/review/created', function ($review, $command) {
- if (class_exists('WPO_Page_Cache')) {
- WPO_Page_Cache::delete_single_post_cache($command->post_id);
- }
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement