Method | Description | |
---|---|---|
decrease_usage_count ( &$coupon, string $used_by = '' ) | Decrease usage count for current coupon. | |
get_code_by_id ( integer $id ) : string | Return a coupon code for a specific ID. | |
get_ids_by_code ( string $code ) : array | Return an array of IDs for for a specific coupon code. | |
get_usage_by_user_id ( &$coupon, id $user_id ) : integer | Get the number of uses for a coupon by user ID. | |
increase_usage_count ( &$coupon, string $used_by = '' ) | Increase usage count for current coupon. |
public decrease_usage_count ( &$coupon, string $used_by = '' ) | ||
$used_by | string | Either user ID or billing email |
public get_code_by_id ( integer $id ) : string | ||
$id | integer | |
return | string | Coupon Code |
public get_ids_by_code ( string $code ) : array | ||
$code | string | |
return | array | Array of IDs. |
public get_usage_by_user_id ( &$coupon, id $user_id ) : integer | ||
$user_id | id | |
return | integer |
public increase_usage_count ( &$coupon, string $used_by = '' ) | ||
$used_by | string | Either user ID or billing email |