Title: Can&#8217;t Hide Plugin PHP Errors (deprecated)
Last modified: February 21, 2026

---

# Can’t Hide Plugin PHP Errors (deprecated)

 *  [Yan Metelitsa](https://wordpress.org/support/users/yanmetelitsa/)
 * (@yanmetelitsa)
 * [3 months ago](https://wordpress.org/support/topic/cant-hide-plugin-php-errors-deprecated/)
 * Hi! Thank you so much for such an awesome plugin.
 * I ran into an issue when trying to hide warnings about deprecated functions in
   the **[Google for WooCommerce](https://woocommerce.com/products/google-listings-and-ads/)**
   plugin. It is installed via the WooCommerce extensions, not through the WordPress
   plugin repository.
 * I tried using this filter inside my theme, but it didn’t help. I noticed that
   the `$levels` variable is an empty array, even though QM shows 3.5K errors.
 *     ```wp-block-code
       add_filter( 'qm/collect/php_error_levels', function ( array $levels ) : array {	$levels[ 'plugin' ][ 'google-listings-and-ads' ] = ( E_ALL & ~E_NOTICE );	return $levels;});
       ```
   
 * I would really appreciate your help, and I can provide more information if needed.

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

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [3 months ago](https://wordpress.org/support/topic/cant-hide-plugin-php-errors-deprecated/#post-18832005)
 * Is the plugin installed into the `wp-content/plugins/google-listings-and-ads`
   directory? Or somewhere else?
 * That `$levels` array just controls the options for filtering which errors get
   collected and shown, so it won’t contain any actual data by default unless something
   hooks into the `qm/collect/php_error_levels` and adjusts it.
 *  Thread Starter [Yan Metelitsa](https://wordpress.org/support/users/yanmetelitsa/)
 * (@yanmetelitsa)
 * [3 months ago](https://wordpress.org/support/topic/cant-hide-plugin-php-errors-deprecated/#post-18832017)
 * Yes, plugin path is `.../wp-content/plugins/google-listings-and-ads`

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcant-hide-plugin-php-errors-deprecated%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Yan Metelitsa](https://wordpress.org/support/users/yanmetelitsa/)
 * Last activity: [3 months ago](https://wordpress.org/support/topic/cant-hide-plugin-php-errors-deprecated/#post-18832017)
 * Status: not resolved