Title: hide admin info
Last modified: November 27, 2022

---

# hide admin info

 *  Resolved [spielo](https://wordpress.org/support/users/spielo/)
 * (@spielo)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/hide-admin-info/)
 * i see always the info in admin panel “wp-cache is detected”, but it works for
   me fine without aktivate this option. so how can i hide this info? i found this
   [https://wp-statistics.com/resources/how-to-disable-cache-notice-in-admin/](https://wp-statistics.com/resources/how-to-disable-cache-notice-in-admin/)
   but is does not work for me, showing stll the info if put the line in der function.
   php
 * I have the latest version of this plugin!
    -  This topic was modified 3 years, 6 months ago by [spielo](https://wordpress.org/support/users/spielo/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [ads97129](https://wordpress.org/support/users/ads97129/)
 * (@ads97129)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/hide-admin-info/#post-16248729)
 * Hello,
    Same here, impossible to disable cache notice in admin. Even if I put
   lines in functions.php :
 *     ```
       add_filter('wp_statistics_cache_status', function ($status) {
           $status['status'] = false;
           return $status;
       });
       ```
   
 * “wp-cache is detected” message always appears in admin.
    Thanks
 *  [Reza](https://wordpress.org/support/users/reventon94/)
 * (@reventon94)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/hide-admin-info/#post-16257267)
 * Hi,
 * I hope you all are doing well.
 * To remove this notice from your WP dashboard, you can add the following lines
   of code to the function.php of your theme.
 *     ```
       add_filter('wp_statistics_cache_status', function ($status) {
           $status['status'] = false;
           return $status;
       });
       ```
   
 * I’ve already tested it and it works.
 * Best Regards
 *  [darkfish.caver](https://wordpress.org/support/users/darkfishcaver/)
 * (@darkfishcaver)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/hide-admin-info/#post-16493297)
 * I am not sure why this issue has been closed as resolved, despite users saying
   that the suggested solution doesn’t work. It doesn’t work for me either.
 *  [darkfish.caver](https://wordpress.org/support/users/darkfishcaver/)
 * (@darkfishcaver)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/hide-admin-info/#post-16493391)
 * And the reason it doesn’t work is because the plugin has incorrect logic.
 * In the file, `includes/class-wp-statistics-helper.php:175`, in function `is_active_cache_plugin()`
   instead of initialising and never using the variable `$use` for early exit, like
   using a guard clause. It should instead assume status true, then apply filter,
   and then early exit based on filter. Like shown below.
 * From line 177
 *     ```wp-block-code
       $use = array('status' => true, 'plugin' => '');
               $use = apply_filters('wp_statistics_cache_status', $use);
   
               if (isset($use) and is_array($use) and $use['status'] === false) {
                   return $use;
               }
       ```
   
 * And then remove the last line in that function, which is never reached anyway.`
   return apply_filters('wp_statistics_cache_status', $use);`
 * This is, of course, in conjunction with defining the filter in a theme’s functions.
   php.
    -  This reply was modified 3 years, 3 months ago by [darkfish.caver](https://wordpress.org/support/users/darkfishcaver/).
      Reason: Add info on required add_filter in theme functions

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘hide admin info’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [darkfish.caver](https://wordpress.org/support/users/darkfishcaver/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/hide-admin-info/#post-16493391)
 * Status: resolved