Automattic\WooCommerce\Admin\Notes

Note::set_content()publicWC 1.0

Set note content.

Method of the class: Note{}

No Hooks.

Return

null. Nothing (null).

Usage

$Note = new Note();
$Note->set_content( $content );
$content(string) (required)
Note content.

Note::set_content() code WC 8.7.0

public function set_content( $content ) {
	$allowed_html = array(
		'br'     => array(),
		'em'     => array(),
		'strong' => array(),
		'a'      => array(
			'href'     => true,
			'rel'      => true,
			'name'     => true,
			'target'   => true,
			'download' => array(
				'valueless' => 'y',
			),
		),
		'p'      => array(),
	);

	$content = wp_kses( $content, $allowed_html );

	if ( empty( $content ) ) {
		$this->error( 'admin_note_invalid_data', __( 'The admin note content prop cannot be empty.', 'woocommerce' ) );
	}

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