WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

Note::set_type() public WC 1.0

Set note type.

{} It's a method of the class: Note{}

No Hooks.

Return

null. Nothing.

Usage

$Note = new Note();
$Note->set_type( $type );
$type(string) (required)
Note type.

Code of Note::set_type() WC 5.2.2

<?php
public function set_type( $type ) {
	if ( empty( $type ) ) {
		$this->error( 'admin_note_invalid_data', __( 'The admin note type prop cannot be empty.', 'woocommerce' ) );
	}

	if ( ! in_array( $type, self::get_allowed_types(), true ) ) {
		$this->error(
			'admin_note_invalid_data',
			sprintf(
				/* translators: %s: admin note type. */
				__( 'The admin note type prop (%s) is not one of the supported types.', 'woocommerce' ),
				$type
			)
		);
	}

	$this->set_prop( 'type', $type );
}