I've set up an affiliate programme at a Woocommerce store using AffiliateWP. In addition to the ability to earn through tracking links, I'm also giving coupon codes to affiliates which they can give to their followers using 'Show Affiliate Coupons' add-on: https://affiliatewp.com/add-ons/official-free/show-affiliate-coupons/
Is there a way to auto-generate the coupon codes and be assigned to affiliates once they are approved?
UPDATE: Upon further reading, it seems it's pretty easy. This is what has to be done:
1) Check if user is new affiliate
2) create coupon using https://docs.woocommerce.com/document/create-a-coupon-programatically/?fbclid=IwAR3FOseoepms0H6H8pow6zFrpEEXRSj3J7PICwu3-be3t5tCULWIFITz_Mg and assign it to affiliate