ActionScheduler_DBStore::get_claim_id()publicWC 1.0

Return an action's claim ID, as stored in the claim_id column.

Method of the class: ActionScheduler_DBStore{}

No Hooks.

Return

Mixed.

Usage

$ActionScheduler_DBStore = new ActionScheduler_DBStore();
$ActionScheduler_DBStore->get_claim_id( $action_id );
$action_id(string) (required)
Action ID.

ActionScheduler_DBStore::get_claim_id() code WC 8.7.0

public function get_claim_id( $action_id ) {
	/** @var \wpdb $wpdb */
	global $wpdb;

	$sql = "SELECT claim_id FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d";
	$sql = $wpdb->prepare( $sql, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared

	return (int) $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}