WC_Deprecated_Hooks::maybe_handle_deprecated_hook
If the hook is Deprecated, call the old hooks here.
Method of the class: WC_Deprecated_Hooks{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Deprecated_Hooks = new WC_Deprecated_Hooks(); $WC_Deprecated_Hooks->maybe_handle_deprecated_hook();
WC_Deprecated_Hooks::maybe_handle_deprecated_hook() WC Deprecated Hooks::maybe handle deprecated hook code WC 10.5.0
public function maybe_handle_deprecated_hook() {
$new_hook = current_filter();
$old_hooks = $this->get_old_hooks( $new_hook );
$new_callback_args = func_get_args();
$return_value = $new_callback_args[0];
foreach ( $old_hooks as $old_hook ) {
$return_value = $this->handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value );
}
return $return_value;
}