Skip to content

Instantly share code, notes, and snippets.

@mishterk
Created January 30, 2022 02:25
Show Gist options
  • Save mishterk/8f33fe4750339817b34237f2cca3723f to your computer and use it in GitHub Desktop.
Save mishterk/8f33fe4750339817b34237f2cca3723f to your computer and use it in GitHub Desktop.
<?php
// Disable deprecation notices so we can get a better idea of what's going on in our log.
// These hooks are all in wp-includes/functions.php.
// Note that these hooks don't stop WooCommerce from logging deprecation notices on AJAX
// or REST API calls as it makes its own calls to `error_log()` from within
// woocommerce/includes/wc-deprecated-functions.php.
add_filter( 'deprecated_constructor_trigger_error', '__return_false' );
add_filter( 'deprecated_function_trigger_error', '__return_false' );
add_filter( 'deprecated_file_trigger_error', '__return_false' );
add_filter( 'deprecated_argument_trigger_error', '__return_false' );
add_filter( 'deprecated_hook_trigger_error', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment