Home Forums Event Espresso Premium EE code snippet

EE code snippet

Posted: March 14, 2020 at 8:25 am


March 14, 2020 at 8:25 am

Hi guys,

I’ve been using this snippet and to good effect, thanks for providing:

However, is there a way to assign a quantity to this? So in your code, say cap ‘shipping fee’ so when one registrant has chosen that option, it is no longer available to other registrants?

In my case, I’m using this to build add-ons but said add-ons have limited availability and large $/£ values so don’t want to get sucked into issuing large refunds if registrants are adding-on something we no longer have available. Do this make sense?

Thanks so much in advnace


  • Support Staff

March 19, 2020 at 3:40 pm


This does make sense, however the code from the snippet does not include a way to assign a quantity, and actually it would require more than just assigning a quantity to make a question option no longer available. Something would also need to retrieve the number of times the chosen option has previously been selected. Then some additional logic to remove an option if no longer available.

So this could be possible but would require some significant development that would be in addition to the snippet you’re already using. One approach could be use the FHEE__EE_Question__generate_form_input__return filter hook to alter what’s available as an option (based on information from previous selections from other registrations already in the database).

This type of project will require the experience of a PHP developer that’s familiar with the WordPress plugin API and has a good grasp of object-oriented programming. Not every team has this, and when that’s the case we recommend contacting, they have developers there that could do a project like this for a reasonable fee.

You must be logged in to reply to this support post. Sign In or Register for an Account

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: publish

Updated by  Josh 1 week, 3 days ago ago

Topic Tags


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