Automattic\WooCommerce\Admin\Notes
Note::set_status()
Set note status.
Метод класса: Note{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Note = new Note(); $Note->set_status( $status );
- $status(строка) (обязательный)
- Note status.
Код Note::set_status() Note::set status WC 9.8.5
public function set_status( $status ) { if ( empty( $status ) ) { $this->error( 'admin_note_invalid_data', __( 'The admin note status prop cannot be empty.', 'woocommerce' ) ); } if ( ! in_array( $status, self::get_allowed_statuses(), true ) ) { $this->error( 'admin_note_invalid_data', sprintf( /* translators: %s: admin note status property. */ __( 'The admin note status prop (%s) is not one of the supported statuses.', 'woocommerce' ), $status ) ); } $this->set_prop( 'status', $status ); }