Skip to content

Commit

Permalink
Merge pull request #28 from Automattic/trepmal-force-cache-flush
Browse files Browse the repository at this point in the history
Forcibly delete rules cache on flush
  • Loading branch information
GaryJones committed May 16, 2024
2 parents e73b243 + 19ff8de commit 565223e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/class-rewrite-rules-inspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ public function flush_rules() {
wp_die( esc_html__( 'You do not have permissions to perform this action.', 'rewrite-rules-inspector' ) );
}

wp_cache_delete( 'rewrite_rules', 'options' );
// phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules
flush_rewrite_rules( false );
do_action( 'rri_flush_rules' );
Expand Down

0 comments on commit 565223e

Please sign in to comment.