WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::log_execution() public WC 1.0

Log Execution.

{} It's a method of the class: ActionScheduler_wpPostStore{}

No Hooks.

Return

null. Nothing.

Usage

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->log_execution( $action_id );
$action_id(string) (required)
Action ID.

Code of ActionScheduler_wpPostStore::log_execution() WC 6.1.1

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
		)
	);
}