Automattic\WooCommerce\Admin\Notes

Note::set_content_data()publicWC 1.0

Set note data for potential re-localization.

Method of the class: Note{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Note = new Note();
$Note->set_content_data( $content_data );
$content_data(object) (required)
Note data.

Note::set_content_data() code WC 9.8.5

public function set_content_data( $content_data ) {
	$allowed_type = false;

	// Make sure $content_data is stdClass Object or an array.
	if ( ! ( $content_data instanceof \stdClass ) ) {
		$this->error( 'admin_note_invalid_data', __( 'The admin note content_data prop must be an instance of stdClass.', 'woocommerce' ) );
	}

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