Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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