ActionScheduler_wpPostStore::log_execution()publicWC 1.0

Log Execution.

{} Это метод класса: ActionScheduler_wpPostStore{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->log_execution( $action_id );
$action_id(строка) (обязательный)
Action ID.

Код ActionScheduler_wpPostStore::log_execution() WC 6.9.4

public function log_execution( $action_id ) {
	/**
	 * Global wpdb object.
	 *
	 * @var wpdb $wpdb
	 */
	global $wpdb;

	// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
	$wpdb->query(
		$wpdb->prepare(
			"UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s",
			self::STATUS_RUNNING,
			current_time( 'mysql', true ),
			current_time( 'mysql' ),
			$action_id,
			self::POST_TYPE
		)
	);
}