Home Forums Event Espresso Premium Automating Gift Card Sales in WooCommerce to EE?

Automating Gift Card Sales in WooCommerce to EE?

Posted: August 1, 2020 at 9:05 am


August 1, 2020 at 9:05 am

Another request came across my desk. The PGPA Team has a small golf retail store on their store subdomain. Now, they are going to be going from 12 golf items to probably 20 or 25. The main one is the almighty GIFT CARD! I explained to them that they likely need two gift card options – one for events and one for retail.

So, here is the goal – have a gift card that generates a promo code (built into their WooCommerce products – which they will take care of) and push the promo code into universal offering within EE (on the main domain) so the person the customer is buying for can use the cash value gift card (promo code) towards registration on the event with the EE registration environment. Ideally, they wanted people to be able to buy universal gift cards, but I told them that the EE software is different than the WooCommerce, so they run the risk of generating a coded that will be showing in two places, thereby potentially having a $50 gift card be duplicated and hence turning into $100, which would not be good. [Hence why I told them to keep it semi-simple and offer one gift card for retail and one for events].

I’ve considered trying to build it out custom using Zapier or even thought about WP Fusion. Thoughts?


  • Support Staff

August 3, 2020 at 7:02 am

Hi there,

I’m going to prefix this with a disclaimer, why will become clear as you work through this reply 🙂

We don’t have a gift certificate add-on and as much as we’d like to (sometimes) we can’t provide support custom development. We can help point you in the right direction but it’s important to note that any examples given are unofficial and unsupported.

So having said that because you are keeping the gift cards separate and specifically for Event Espresso this is actually fairly simple to do with the promotions add-on and a snippet I created a little while ago to create a simple/basic gift card proof of concept a little while ago.

First, take a look here:

That snippet treats ‘dollar’ promotions as gift cards in that is will deduct the transaction total from the value set on the promotion until it reaches 0, at which point it will mark the promotion as expired using the valid until date within the promotion.

Simple enough except it will do so for ALL dollar promotions in the system so you’ll need to add your own method of determining if a promotion is also a gift card if you use dollar promotions for anything else.

That’s 50% of the work done in that you now have promotions that act as gift cards and allow you to ‘use’ the value of a gift card.

Next, you’ll need some way ‘sell’ the gift card, how you do that is up to you, there’s a ton of options and it depends on what you want to do. Personally, if I were already using Woo I’d look into selling them through Woo and hook into the purchase to generate the promotion in EE. You can find an example of to generate the promotions programmatically from within the promotions add-on itself (See the _insert_update_promotions() method within the add-on).

When you get all of that working you could then into some kind of Woo sync with promotions, maybe selling a gift cert through Woo that is marked for Event Espresso would automatically invalidate the ‘Woo’ gift card but still create the EE one, or even allow them to be used in both locations and sync the value (that may not be a good idea though) but again, get the basic concept working above and then start investigating how much of that is possible.

I haven’t gone into a great amount of detail above and that’s intentional as (with all due respect) if none of the above makes any sense then it’s not something you should try using as again, we don’t provide support for any of it. (I don’t how comfortable you, or any future readers are with PHP/WP/etc so the above is in general not you specifically).

With regards to a Zapier and or WP Fusion integration for this, I can only repeat what I mentioned in your other thread, it’s likely possible to do some of the above using those but it’s not something we can recommend/advise on as we don’t have a gift certificate add-on/feature to start from so it’s all custom/workarounds.

The support post ‘Automating Gift Card Sales in WooCommerce to EE?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  Tony 1 week, 1 day ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!