Remove link to print tickets

Home Forums Ticket Products Event Tickets Plus Remove link to print tickets

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #946074
    Autumn
    Participant

    Is there a way to remove the “print tickets” link in the Purchase Receipt email? My events don’t actually have tickets so I would like this removed.

    Thank you.

    #946275
    Barry
    Member

    Hi Autumn,

    There certainly is. This short snippet (which you could for instance add to your theme’s functions.php file) ought to do the trick:

    // Wait until EDD Tickets has set its hooks up
    add_action( 'init', 'remove_edd_print_tickets_link' );
    
    function remove_edd_print_tickets_link() {
       // Do not trigger a fatal should EDD Tickets be removed/temporarily deactivated
       if ( ! class_exists( 'TribeEDDTickets' ) ) return;
    
       // Unhook the "print tickets" link generator
       $callback = array( TribeEDDTickets::get_instance(), 'ticket_downloads' );
       remove_filter( 'edd_download_files', $callback, 10, 2  );
    }

    Does that work for you?

    #950428
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Remove link to print tickets’ is closed to new replies.