Error Setting Variable to a Boolean Value

[ad_1]

Does setting variables to boolean values not work in this plugin? Here’s my code:

add_filter( 'do_rocket_generate_caching_files', function($filter) {
if ( is_user_logged_in() ) {
$filter = false;
}
return $filter;
} );

This is causing the snippet to be deactivated and throwing this error…

2023-07-28T12:45:15+00:00 Undefined variable $false

2023-07-28T12:45:15+00:00 Snippet "WP Rocket Functions" (#1100) was automatically deactivated due to a fatal error.

What’s going on here?

  • This topic was modified 46 minutes ago by thekendog.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer