wc_do_deprecated_action( string $tag, array $args, string $version, string $replacement = null, string $message = null )

Runs a deprecated action with notice only if used.


Description Description


Parameters Parameters

$tag

(Required) The name of the action hook.

$args

(Required) Array of additional function arguments to be passed to do_action().

$version

(Required) The version of WooCommerce that deprecated the hook.

$replacement

(Optional) The hook that should have been used.

Default value: null

$message

(Optional) A message regarding the change.

Default value: null


Top ↑

Source Source

File: includes/wc-deprecated-functions.php

function wc_do_deprecated_action( $tag, $args, $version, $replacement = null, $message = null ) {
	if ( ! has_action( $tag ) ) {
		return;
	}

	wc_deprecated_hook( $tag, $version, $replacement, $message );
	do_action_ref_array( $tag, $args );
}

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.