ActionScheduler_wpCommentLogger::log
Create log entry.
Метод класса: ActionScheduler_wpCommentLogger{}
Хуков нет.
Возвращает
string. The log entry ID
Использование
$ActionScheduler_wpCommentLogger = new ActionScheduler_wpCommentLogger(); $ActionScheduler_wpCommentLogger->log( $action_id, $message, ?DateTime $date );
- $action_id(строка) (обязательный)
- Action ID.
- $message(строка) (обязательный)
- Action log's message.
- ?DateTime $date
- .
По умолчанию:null
Код ActionScheduler_wpCommentLogger::log() ActionScheduler wpCommentLogger::log WC 11.2.2
public function log( $action_id, $message, ?DateTime $date = null ) {
if ( empty( $date ) ) {
$date = as_get_datetime_object();
} else {
$date = as_get_datetime_object( clone $date );
}
$comment_id = $this->create_wp_comment( $action_id, $message, $date );
return $comment_id;
}