I had it the other way around. Customer ordered 6 coupons, got 9 instead of 6. All of them working and with the coupon generated in Woocommerce.
Made it a grouped product.
With instead of variable options multiple simple products.
Works fine!
Hi Kislay, MaLa88
I’ve changed the code to the post ID (4nrs) + a combination of 5 letters:
$couponcode = $post_id . str_shuffle(‘abcyz’);
Works fine !
-> f.e. 2934cyzab