WC_Deprecated_Action_Hooks::handle_deprecated_hook()
If the old hook is in-use, trigger it.
Method of the class: WC_Deprecated_Action_Hooks{}
No Hooks.
Return
Mixed
.
Usage
$WC_Deprecated_Action_Hooks = new WC_Deprecated_Action_Hooks(); $WC_Deprecated_Action_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.
WC_Deprecated_Action_Hooks::handle_deprecated_hook() WC Deprecated Action Hooks::handle deprecated hook code WC 9.4.2
public function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value ) { if ( has_action( $old_hook ) ) { $this->display_notice( $old_hook, $new_hook ); $return_value = $this->trigger_hook( $old_hook, $new_callback_args ); } return $return_value; }