I suggest you ...

Create a Discount Code

this formula should do the trick (which you can put in the ‘Setup donation formula’ pop up, in the smart donations tab btw):

(function(){var discount=0;
if([field rnField1]==’Code1′)
discount=50;
if([field rnField1]==’Code2′)
discount=100;
return [field rnField2]-discount;
}())

You just need to do these changes:
1.-Change code1 and code2 with the real coupon codes that you want to use
2.-Change rnField1 with the id of the field that will hold the coupon code
3.-Change rnField2 with the field that will hold the donation amount, if the donation amount is a fixed amount you can replace it with the fixed amount (e.g. [field 100-discount;)

Formula created by EDGARROJAS
https://wordpress.org/support/topic/create-a-discount-code/

2 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Jorge Herrera shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base