ActionScheduler_DBStore::log_execution()
Add execution message to action log.
Метод класса: ActionScheduler_DBStore{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$ActionScheduler_DBStore = new ActionScheduler_DBStore(); $ActionScheduler_DBStore->log_execution( $action_id );
- $action_id(int) (обязательный)
- Action ID.
Код ActionScheduler_DBStore::log_execution() ActionScheduler DBStore::log execution WC 7.7.0
public function log_execution( $action_id ) { /** @var \wpdb $wpdb */ global $wpdb; $sql = "UPDATE {$wpdb->actionscheduler_actions} SET attempts = attempts+1, status=%s, last_attempt_gmt = %s, last_attempt_local = %s WHERE action_id = %d"; $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time( 'mysql', true ), current_time( 'mysql' ), $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared }