WC_Deprecated_Filter_Hooks::handle_deprecated_hook()publicWC 1.0

If the old hook is in-use, trigger it.

{} It's a method of the class: WC_Deprecated_Filter_Hooks{}

No Hooks.

Return

Mixed.

Usage

$WC_Deprecated_Filter_Hooks = new WC_Deprecated_Filter_Hooks();
$WC_Deprecated_Filter_Hooks->handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value );
$new_hook(string) (required)
New hook name.
$old_hook(string) (required)
Old hook name.
$new_callback_args(array) (required)
New callback args.
$return_value(mixed) (required)
Returned value.

Code of WC_Deprecated_Filter_Hooks::handle_deprecated_hook() WC 6.7.0

public function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value ) {
	if ( has_filter( $old_hook ) ) {
		$this->display_notice( $old_hook, $new_hook );
		$return_value = $this->trigger_hook( $old_hook, $new_callback_args );
	}
	return $return_value;
}