Posted: March 14, 2020 at 8:25 am
I’ve been using this snippet and to good effect, thanks for providing: https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_ee_apply_transaction_surcharge.php
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
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
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 codeable.io, they have developers there that could do a project like this for a reasonable fee.