deprecated_function_run action-hookWC 3.0.0

This is a WordPress - deprecated_function_run hook. The plugin just uses it.

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

Usage

add_action( 'deprecated_function_run', 'wp_kama_deprecated_function_run_action', 10, 3 );

/**
 * Function for `deprecated_function_run` action-hook.
 * 
 * @param string $function_name The function that was called.
 * @param string $replacement   The function that should have been called.
 * @param string $version       The version of WordPress that deprecated the function.
 *
 * @return void
 */
function wp_kama_deprecated_function_run_action( $function_name, $replacement, $version ){

	// action...
}
$function_name(string)
The function that was called.
$replacement(string)
The function that should have been called.
$version(string)
The version of WordPress that deprecated the function.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

wc_deprecated_function()
deprecated_function_run
Bootstrap::deprecated_dependency()
deprecated_function_run
woocommerce/includes/wc-deprecated-functions.php 51
do_action( 'deprecated_function_run', $function, $replacement, $version );
woocommerce/src/Blocks/Domain/Bootstrap.php 472
do_action( 'deprecated_function_run', $function, $replacement, $version );

Where the hook is used in WooCommerce

Usage not found.