Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Gift Voucher Plugin?

Featured Replies

Hi all,

 

I'm just wondering how I would go about adding Gift Voucher functionality to a website. What I want is for someone to pay an amount then receive an email that they can print off and bring to a store.

 

I looked around for some plugins but didn't find anything that suited.

 

Any ideas? Could a PayPal button be a good option?

 

Thanks,

Al.

Easy to do.

 

After payment you just need a function that sends off the email with the voucher details. It all depends on how you are taking payments. PayPal has this great IPN feature that notifies you that payment is complete. You can add the ipn function to your functions.php and add use the wp_mail function to send the email.

 

Or you can use a digital download plugin, there are lots to choose form. But building the code into your theme is a much better and lightweight way to do things. If you want to do it yourself I can point you towards the necessary code.

  • Author

Hi fisicx, thanks for the reply.

 

Would greatly appreciate if you could point me towards coding this myself or even links to those plugins?

 

 

Thanks,

Al. =)

This is the code: https://github.com/paypal/ipn-code-samples/tree/master/php

 

Add a new function to your functions.php and paste in the example code. Don't use the include, Just add the class from paypalipn.php to the function.

 

in the example code use wp_mail to send the email.

 

You can get all the payees data from the $res variable. I use explode to convert this into an array and then just use the bits I need.

 

Sorry if this all sounds a bit waffly but it all depends on your theme and how you are making the payment. for example if you are using in-context checkout then you don't need IPN

 

 

This plugin works but is a large sledgehammer to crack a very small nut: https://en-gb.wordpress.org/plugins/easy-digital-downloads/

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.