wc_set_notices() WC 2.6.0
Set all notices at once.
Хуков нет.
Возвращает
Null. Ничего.
Использование
wc_set_notices( $notices );
- $notices(массив[]) (обязательный)
- Array of notices.
Список изменений
С версии 2.6.0 | Введена. |
Код wc_set_notices() wc set notices WC 5.0.0
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', $notices );
}