Creating coupons programmatically with “Limit usage to X items”
-
Hi,
As the title suggests i’m creating coupons programmatically and it works great.However, i would like to limit some of them to 2 of the discounted product and i can’t find the method for doing so. Can you help me with the right method?
These are the limitations i’m using so far:
$coupon->set_individual_use( true ); $coupon->set_product_ids( array( 10063 ) ); $coupon->set_usage_limit_per_user( 1 ); $coupon->set_usage_limit( 1 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Creating coupons programmatically with “Limit usage to X items”’ is closed to new replies.