wc_do_deprecated_action()
Runs a deprecated action with notice only if used.
Хуки из функции
Возвращает
void. Ничего (null).
Использование
wc_do_deprecated_action( $tag, $args, $version, $replacement, $message );
- $tag(строка) (обязательный)
- The name of the action hook.
- $args(массив) (обязательный)
- Array of additional function arguments to be passed to do_action().
- $version(строка) (обязательный)
- The version of WooCommerce that deprecated the hook.
- $replacement(строка)
- The hook that should have been used.
По умолчанию:null - $message(строка)
- A message regarding the change.
По умолчанию:null
Список изменений
| С версии 3.0.0 | Введена. |
Код wc_do_deprecated_action() wc do deprecated action WC 11.2.2
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 );
}