w3tc_errors and w3tc_notices filter bug
-
In method remove_w3tc_admin_notices, you are using __return_false. This is wrong and causing errors due to a foreach looping on false. Use a callback to return an empty array. I had to use the following code in a theme to fix your error.
add_action('admin_init', function () { add_filter('w3tc_errors', function ($errors) { if (!$errors) { return []; } return $errors; }); add_filter('w3tc_notes', function ($notes) { if (!$notes) { return []; } return $notes; }); }, 11);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘w3tc_errors and w3tc_notices filter bug’ is closed to new replies.