• jaggreene

    (@jaggreene)


    I have a sales page with a time-sensitive offer. Whoever comes to the page and buys first gets the product.

    Therefore when charge succeeded event is triggered, I want the sales page to be redirected to an out of stock page.

    So for example, I have a page called http://www.example.com/sales-page.
    It is available for 3 days.

    1 day into the sale someone comes along and buys the product.

    If someone else comes to http://www.example.com/sales-page after the product has been purchased, I want it to go to http://www.example.com/too-late.

    How do I redirect someone using wordpress+stripe? I assume it is a function in charge succeeded event. I am just not sure what function.

    How do I check if someone has purchased before them in order to show them the too-late page?

    Where would this code go (functions.php)?

    http://wordpress.org/extend/plugins/gravity-forms-stripe/

Viewing 1 replies (of 1 total)
  • Thread Starter jaggreene

    (@jaggreene)

    Quick update.

    I have cobbled together the following code that I think will do what I want. test key has been changed to a random value.

    http://pastebin.com/aiqCk4tt

    I use a value in custom field suite plugin meta box on the post.

    When the value is set to 1 the page disappears.

    When it is zero pages stays live.

    the problem is I am not sure where to put the code. Because when I add it to theme functions.php it says fatal error called to undefined function add_action()

Viewing 1 replies (of 1 total)
  • The topic ‘Gravity Forms Stripe Time-Based Sales’ is closed to new replies.