Automattic\WooCommerce\Admin\Notes
Note::set_date_created()
Set date note was created. NULL is not allowed
Метод класса: Note{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Note = new Note(); $Note->set_date_created( $date );
- $date(строка|int) (обязательный)
- UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed.
Код Note::set_date_created() Note::set date created WC 9.6.0
public function set_date_created( $date ) { if ( empty( $date ) ) { $this->error( 'admin_note_invalid_data', __( 'The admin note date prop cannot be empty.', 'woocommerce' ) ); } if ( is_string( $date ) && ! is_numeric( $date ) ) { $date = wc_string_to_timestamp( $date ); } $this->set_date_prop( 'date_created', $date ); }