Support

Home Forums Ticketing Add-on Conditional end_date to not display if same as start_date on ticketing add-on

Conditional end_date to not display if same as start_date on ticketing add-on

Posted: October 8, 2014 at 8:06 am

Viewing 3 reply threads


Malcolm Green

October 8, 2014 at 8:06 am

I’m trying to figure out how to not display the [end_date] on the ticketing add-on if it’s the same as the [start_date]…please advise…


Sidney Harrell

October 8, 2014 at 12:51 pm

You would need to go into plugins/espresso-ticketing/functions.php and customize the espresso_replace_ticket_shortcodes function on line 258. I would change line 349:

         event_date_display($data->attendee->end_date),

to:

   $data->attendee->start_date == $data->attendee->end_date ? '' : event_date_display($data->attendee->end_date),


Malcolm Green

October 10, 2014 at 4:33 pm

Thanks Sidney!

Quick follow up though…if I alter the functions.php won’t that get overwritten in an update? Is there a way I can add a functions.php to the uploads > espresso > tickets and have it work? Please advise on how I can update without worry of overwrites.


Dean

October 13, 2014 at 3:39 am

Hi,

At this moment the function to be changed is not “pluggable”, nor can the file be duplicated elsewhere to avoid over writes on updates.

I’ll make a request to see if we can either make it pluggable of better yet add a filter hook in there, but of course I cannot advise if/when this would be actioned on.

In the meantime you would need to modify the file after each update.

Viewing 3 reply threads

The support post ‘Conditional end_date to not display if same as start_date on ticketing add-on’ 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