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

Wrapper for _doing_it_wrong().


Description Description


Parameters Parameters

$function

(Required) Function used.

$message

(Required) Message to log.

$version

(Required) Version the message was added in.


Top ↑

Source Source

File: includes/wc-deprecated-functions.php

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
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.