WC_Coupon_Data_Store_Interface::get_usage_by_user_id()
Get the number of uses for a coupon by user ID.
Method of the class: WC_Coupon_Data_Store_Interface{}
No Hooks.
Return
Int
.
Usage
$WC_Coupon_Data_Store_Interface = new WC_Coupon_Data_Store_Interface(); $WC_Coupon_Data_Store_Interface->get_usage_by_user_id( $coupon, $user_id );
- $coupon(WC_Coupon) (required) (passed by reference — &)
- Coupon object.
- $user_id(int) (required)
- User ID.
WC_Coupon_Data_Store_Interface::get_usage_by_user_id() WC Coupon Data Store Interface::get usage by user id code WC 9.4.2
public function get_usage_by_user_id( &$coupon, $user_id );