Override ticket meta template

Home Forums Ticket Products Event Tickets Plus Override ticket meta template

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1232330
    Juan Diego Rodas
    Participant

    Hi, I was trying to replace some tickets meta field templates, the text.php to be specific.
    On the themer’s guide you say that we can replace the template by putting the text.php inside the meta folder on my child theme. I’ve seen that the method that renders the field is on this file: event-tickets-plus/src/Tribe/Meta/Field/Abstract_Field.php

    That method calls to render_field method and there you are not looking for a template on my child theme and your are directly using the theme inside plugin’s folder.

    So on the render_field method you can change this:
    include Tribe__Tickets_Plus__Main::instance()->plugin_path . "src/views/meta/{$template}";
    with this:

    $file = Tribe__Events__Templates::getTemplateHierarchy( "meta/{$template}" );
    
    			if ( ! file_exists( $file ) ) {
    				$file = Tribe__Tickets_Plus__Main::instance()->plugin_path . "src/views/meta/{$template}";
    			}
    
    			include $file;

    That way the method will look for a template on my child theme. I’ve tried this and it works. Without it, the themer’s guide explanation for this templates is not working.

    #1232966
    George
    Participant

    Hey Juan,

    Thanks for reaching out.

    This is unfortunately a known bug that we are working on fixing. A fix should hopefully be arriving some time in the next few weeks, but there is no current workaround for now. 🙁

    I’m sorry to bear this news! But I will mark this thread “pending fix” and can assure you I will post an update here when the bug fix is available and the meta templates thus starting working with our templating system as expected.

    Please let me know if there are any other issues or questions I can try to help with in the meantime.

    Sincerely,
    George

    #1249453
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    #1329129
    Victor
    Member

    Hello Juan!

    Just wanted to share with you that a new maintenance release (for the Week of 24 July 2017) is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/maintenance-release-week-24-july-2017/

    Please update the plugins and see if the fix works for your site. Don’t hesitate to open a new thread if anything comes up and we’d be happy to assist.

    Best,
    Victor

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Override ticket meta template’ is closed to new replies.