ActionScheduler_DBStore::generate_claim_id()protectedWC 1.0

Generate a new action claim.

Метод класса: ActionScheduler_DBStore{}

Хуков нет.

Возвращает

int. Claim ID.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->generate_claim_id();

Код ActionScheduler_DBStore::generate_claim_id() WC 8.7.0

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;
}