WordPress at Your Fingertips
function is not described

ActionScheduler_DBStore::mark_failure() public WC 1.0

Mark an action as failed.

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

No Hooks.

Return

null. Nothing.

Usage

$ActionScheduler_DBStore = new ActionScheduler_DBStore();
$ActionScheduler_DBStore->mark_failure( $action_id );
$action_id(int) (required)
Action ID.

Code of ActionScheduler_DBStore::mark_failure() WC 6.1.0

public function mark_failure( $action_id ) {
	/** @var \wpdb $wpdb */
	global $wpdb;
	$updated = $wpdb->update(
		$wpdb->actionscheduler_actions,
		array( 'status' => self::STATUS_FAILED ),
		array( 'action_id' => $action_id ),
		array( '%s' ),
		array( '%d' )
	);
	if ( empty( $updated ) ) {
		throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'woocommerce' ), $action_id ) ); //phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment
	}
}