WordPress at a glance
function is not described

wc_print_notice() WC 2.1

Print a single notice immediately.

Return

null. Nothing.

Usage

wc_print_notice( $message, $notice_type, $data );
$message(string) (required)
The text to display in the notice.
$notice_type(string)
The singular name of the notice type - either error, success or notice.
$data(array)
Optional notice data. @since 3.9.0.

Changelog

Since 2.1 Introduced.

Code of wc_print_notice() WC 5.3.0

<?php
function wc_print_notice( $message, $notice_type = 'success', $data = array() ) {
	if ( 'success' === $notice_type ) {
		$message = apply_filters( 'woocommerce_add_message', $message );
	}

	$message = apply_filters( 'woocommerce_add_' . $notice_type, $message );

	wc_get_template(
		"notices/{$notice_type}.php",
		array(
			'messages' => array( $message ), // @deprecated 3.9.0
			'notices'  => array(
				array(
					'notice' => $message,
					'data'   => $data,
				),
			),
		)
	);
}