wc_clear_notices()WC 2.1

Unset all notices.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wc_clear_notices();

Список изменений

С версии 2.1 Введена.

Код wc_clear_notices() WC 8.7.0

function wc_clear_notices() {
	if ( ! did_action( 'woocommerce_init' ) ) {
		wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.3' );
		return;
	}
	WC()->session->set( 'wc_notices', null );
}