-1

I'm using an AutomateWoo workflow to generate a coupon on certain triggers, the triggers work fine.

As the action, I'm sending an email and using the following to generate a coupon. Again this works fine and it generates the coupon based on the template.

   {{ advocate.generate_coupon | template: 'raf-advocate', prefix: 'raf-advocate-' }}

Is there a way to limit the created coupon to an email address? I can use the variable in AutomateWoo {{ customer.email }} to get the email address.

I've also tried the following but I can't work out if you can limit it to an email address:

{{ customer.generate_coupon | template: 'raf-advocate' }}
Rob
  • 6,304
  • 24
  • 83
  • 189

1 Answers1

1

If this helps anyone, you can set a filter in your functions.php file to limit it to an email address (in this case it takes the email that you're sending the email to).

add_filter( 'automatewoo/variables/coupons/use_email_restriction', '__return_true' );
Rob
  • 6,304
  • 24
  • 83
  • 189