Merge pull request #14308 from woocommerce/add/14304
Add backtrace to deprecated message
This commit is contained in:
commit
75ecc91d96
|
@ -59,6 +59,8 @@ function wc_deprecated_function( $function, $version, $replacement = null ) {
|
|||
* @param string $replacement
|
||||
*/
|
||||
function wc_doing_it_wrong( $function, $message, $version ) {
|
||||
$message .= ' Backtrace: ' . wp_debug_backtrace_summary();
|
||||
|
||||
if ( is_ajax() ) {
|
||||
do_action( 'doing_it_wrong_run', $function, $message, $version );
|
||||
error_log( "{$function} was called incorrectly. {$message}. This message was added in version {$version}." );
|
||||
|
|
Loading…
Reference in New Issue