Support

Home Forums Event Espresso Premium Viewing Promotional Code Usage

Viewing Promotional Code Usage

Posted: December 5, 2022 at 6:37 am

Viewing 3 reply threads


mpurse

December 5, 2022 at 6:37 am

Is there a way to view which event a promotional code was used on? I have tried searching via registrations or transactions but to no avail.

Thanks.


Tony

  • Support Staff

December 5, 2022 at 3:10 pm

Hi there,

We don’t currently have a way to view the events a promotion has been applied to, but with a snippet and a little but of admin work you can filter the registrations down to see the specific registrations a promotion has been applied to.

Does that work for you?

If so, add this snippet to the site:

https://gist.github.com/Pebblo/90a6db6f500bd5af3240ba108fb61144

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Then you need the Promotion code ID for the promotion code you want to filter down from Event Espresso -> Promotions. Once you have that you go to Event Espresso -> Registrations.

In your browsers address bar it should have something like:

/wp-admin/admin.php?page=espresso_registrations

Add &PRO_ID=XX to the end of the URL (where XX is the Promotion ID you noted earlier), like this:

/wp-admin/admin.php?page=espresso_registrations&PRO_ID=XX

With the snippet I gave you above, the registrations should be filtered down to those using the promotion that matches the ID which should show where it has been used.

Does that help?


mpurse

December 6, 2022 at 12:44 pm

Thanks. I tried to create a Site Specific Plugin but it didn’t work (never appeared in the plugins for activation).

Could I apply the snippet to functions.php instead?


Tony

  • Support Staff

December 6, 2022 at 1:25 pm

Thanks. I tried to create a Site Specific Plugin but it didn’t work (never appeared in the plugins for activation).

That means the file wasn’t set up correctly to be a plugin, usually the header from step 5 here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/#:~:text=5)%20Then%2C%20copy%20the%20sample%20code%20below%3A

But to answer your question, yes, that code should also be fine in functions.php

However, functions.php being from the theme means its recommend to include theme specific functions within that, for others, add them into a custom plugin. The reason for that is if you add a bunch of functions to your theme and then change your theme in say 6 months … then the above stops working for you its confusing as to why 🙂

Viewing 3 reply threads

The support post ‘Viewing Promotional Code Usage’ 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.

Event Espresso