wc_doing_it_wrong() – Wrapper for _doing_it_wrong().

You appear to be a bot. Output may be restricted

Description

Wrapper for _doing_it_wrong().

Usage

wc_doing_it_wrong( $function, $message, $version );

Parameters

$function
( string ) required – Function used.
$message
( string ) required – Message to log.
$version
( string ) required – Version the message was added in.

Returns

void

Source

File name: woocommerce/includes/wc-deprecated-functions.php


Lines:

1 to 14 of 14
function wc_doing_it_wrong( $function, $message, $version ) {
  // @codingStandardsIgnoreStart
  $message .= ' Backtrace: ' . wp_debug_backtrace_summary();

  if ( is_ajax() || WC()->is_rest_api_request() ) {
    do_action( 'doing_it_wrong_run', $function, $message, $version );
    error_log( "{$function} was called incorrectly. {$message}. This message was added in version {$version}." );
  } else {
    _doing_it_wrong( $function, $message, $version );
  }
  // @codingStandardsIgnoreEnd
}
 

 View on GitHub View on Trac