wc_set_notices()
Set all notices at once.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wc_set_notices( $notices );
- $notices(array[]) (обязательный)
- Array of notices.
Список изменений
| С версии 2.6.0 | Введена. |
Код wc_set_notices() wc set notices WC 11.0.1
function wc_set_notices( $notices ) {
if ( ! did_action( 'woocommerce_init' ) ) {
wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.6' );
return;
}
WC()->session->set( 'wc_notices', empty( $notices ) ? null : $notices );
}