Automattic\WooCommerce\Admin\Notes
Note::set_content_data
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() Note::set content data code WC 10.6.2
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 );
}