ActionScheduler_DBStore::generate_claim_id()protectedWC 1.0

Generate a new action claim.

Method of the class: ActionScheduler_DBStore{}

No Hooks.

Return

Int. Claim ID.

Usage

// protected - for code of main (parent) or child class
$result = $this->generate_claim_id();

ActionScheduler_DBStore::generate_claim_id() code WC 8.6.1

protected function generate_claim_id() {
	/** @var \wpdb $wpdb */
	global $wpdb;
	$now = as_get_datetime_object();
	$wpdb->insert( $wpdb->actionscheduler_claims, array( 'date_created_gmt' => $now->format( 'Y-m-d H:i:s' ) ) );

	return $wpdb->insert_id;
}