Automattic\WooCommerce\Admin\Notes

Note::set_layout()publicWC 1.0

Set note layout.

Method of the class: Note{}

No Hooks.

Return

null. Nothing (null).

Usage

$Note = new Note();
$Note->set_layout( $layout );
$layout(string) (required)
Note layout.

Note::set_layout() code WC 9.7.1

public function set_layout( $layout ) {
	// If we don't receive a layout we will set it by default as "plain".
	if ( empty( $layout ) ) {
		$layout = 'plain';
	}
	$valid_layouts = array( 'plain', 'thumbnail' );

	if ( in_array( $layout, $valid_layouts, true ) ) {
		$this->set_prop( 'layout', $layout );
	} else {
		$this->error( 'admin_note_invalid_data', __( 'The admin note layout has a wrong prop value.', 'woocommerce' ) );
	}
}