- This topic has 2 replies, 2 voices, and was last updated 6 years, 6 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Stripe payment plugins for your WordPress site
· ·
Home › Forums › Stripe Payments Plugin › using tags on stripe-checkout-result page as shortcode arguments
Hello,
Thanks for your great plugin.
I need to add a product license key to the stripe-checkout-result page, which is generated using the customer’s email address. While I can successfully display the email entered using the {payer_email} tag, I haven’t yet succeeded in passing it on to my shortcode function (called [hash]) that generates the license key.
For example, a stripe-checkout-result page containing
[accept_stripe_payment_checkout]
[hash name=”{payer_email}”]
[/accept_stripe_payment_checkout]
does NOT replace {payer_email} with the email address entered by the customer, but instead uses the literal string ‘{payer_email}’ (which is obviously not what I want). I also tried other variations, such as not using double quotes, or using {{…}} etc.
How can I enforce that the {payer_email} is parsed *before* it is passed on to the hash function?
Thanks!
You can’t use the tags that way. Instead use the filter hook of the plugin to get notified when a transaction happens and it is going to show data on the thank you page, then from your custom code handle the license related functionality. Using the hook is the proper way of doing what you are trying to do.
The plugin triggers the following filter hook that you should be able to use. It will pass the transaction data also:
asp_stripe_payments_checkout_page_result
The following documentation has an example of how to use it:
Thanks for the pointer, I got it to work now – your help is greatly appreciated!!