wc_doing_it_wrong
Wrapper for wc_doing_it_wrong.
Description
Parameters (3)
- 0. $function (string)
- The function.
- 1. $message (string)
- The message.
- 2. $version (string)
- The version.
Usage
if ( !function_exists( 'wc_doing_it_wrong' ) ) { require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; } // The function. $function = ''; // The message. $message = ''; // The version. $version = ''; // NOTICE! Understand what this does before running. $result = wc_doing_it_wrong($function, $message, $version);
Defined (1)
The function is defined in the following location(s).
- /includes/wc-deprecated-functions.php
- 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}." );
- } else {
- _doing_it_wrong( $function, $message, $version );
- }
- }