wc_deprecated_argument( string $argument, string $version,  $message = null )

Wrapper for deprecated arguments so we can apply some extra logic.


Description Description


Parameters Parameters

$argument

(string) (Required)

$version

(string) (Required)

$replacement

(string) (Required)


Top ↑

Source Source

File: includes/wc-deprecated-functions.php

function wc_deprecated_argument( $argument, $version, $message = null ) {
	if ( is_ajax() || WC()->is_rest_api_request() ) {
		do_action( 'deprecated_argument_run', $argument, $message, $version );
		error_log( "The {$argument} argument is deprecated since version {$version}. {$message}" );
	} else {
		_deprecated_argument( $argument, $version, $message );
	}
}

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.