wc_doing_it_wrong

Wrapper for wc_doing_it_wrong.

Description

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

Parameters (3)

0. $function (string)
The function.
1. $message (string)
The message.
2. $version (string)
The version.

Usage

  1. if ( !function_exists( 'wc_doing_it_wrong' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The function. 
  5. $function = ''; 
  6.  
  7. // The message. 
  8. $message = ''; 
  9.  
  10. // The version. 
  11. $version = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wc_doing_it_wrong($function, $message, $version); 
  15.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function wc_doing_it_wrong( $function, $message, $version ) { 
  2. $message .= ' Backtrace: ' . wp_debug_backtrace_summary(); 
  3.  
  4. if ( is_ajax() ) { 
  5. do_action( 'doing_it_wrong_run', $function, $message, $version ); 
  6. error_log( "{$function} was called incorrectly. {$message}. This message was added in version {$version}." ); 
  7. } else { 
  8. _doing_it_wrong( $function, $message, $version );