WC_Coupon_Data_Store_CPT::get_tentative_usage_count()publicWC 1.0

Returns tentative usage count for coupon.

Method of the class: WC_Coupon_Data_Store_CPT{}

No Hooks.

Return

Int. Tentative usage count.

Usage

$WC_Coupon_Data_Store_CPT = new WC_Coupon_Data_Store_CPT();
$WC_Coupon_Data_Store_CPT->get_tentative_usage_count( $coupon_id );
$coupon_id(int) (required)
Coupon ID.

WC_Coupon_Data_Store_CPT::get_tentative_usage_count() code WC 9.4.2

public function get_tentative_usage_count( $coupon_id ) {
	global $wpdb;
	return $wpdb->get_var(
		// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
		$this->get_tentative_usage_query( $coupon_id )
	);
}