Hi there,
I recently updated to the lastes version of EE4. It seems there are a lot of changes concerning the ticket selector.
I modified the EED_Ticket_Selector.module.php, knowing that this was not update safe. Now I have some trouble.
Ok, what I wanted to do:
When an event is sold out, the “regiser now” button is replaced with a “show details” button. I wanted to replace this “destails” butten with a “sold out” label (not a button!).
In my previous version of EE4 I modified EED_Ticket_Selector.module.php:
I commented out line 291 //&& $_event_active_status != EE_Datetime::sold_out
And I replaced line 299
The safe way to achieve avoids modifying core plugin files. Instead, you make use of the available hooks and put your custom code into a functions plugin.
Along with that, I recommend to not change the html for the button. Changing the text is fine and won’t break things, and you can even conditionally load in some styles to make the button look less button-like and more label-like.
So you can add this code to your plugin:
then you add some CSS like this to your custom stylesheet:
Except one little thing: although I can add some CSS code to make it look less than button, it still IS a button. Which means I still can click it.
I’d like to have just a label “sold out” whith no possibility to click on.
The support post ‘modify EED_Ticket_Selector.module.php for events that are sold out’ 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.