ActionScheduler_DBStore::get_claim_id
Return an action's claim ID, as stored in the claim_id column.
Method of the class: ActionScheduler_DBStore{}
No Hooks.
Returns
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() ActionScheduler DBStore::get claim id code WC 10.6.2
public function get_claim_id( $action_id ) {
/**
* Global.
*
* @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
}