WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::mark_complete() public WC 1.0

Record that an action was completed.

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

No Hooks.

Return

null. Nothing.

Usage

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->mark_complete( $action_id );
$action_id(string) (required)
ID of the completed action.

Code of ActionScheduler_wpPostStore::mark_complete() WC 6.1.1

public function mark_complete( $action_id ) {
	$post = get_post( $action_id );
	if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
		/* translators: %s is the action ID */
		throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'woocommerce' ), $action_id ) );
	}
	add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 );
	add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
	$result = wp_update_post(
		array(
			'ID'          => $action_id,
			'post_status' => 'publish',
		),
		true
	);
	remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 );
	remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
	if ( is_wp_error( $result ) ) {
		throw new RuntimeException( $result->get_error_message() );
	}
}