Cannot remove / translate the link "print ticket" in the receipt mails

Home Forums Ticket Products Event Tickets Plus Cannot remove / translate the link "print ticket" in the receipt mails

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1003279
    puntueus
    Participant

    Hi,

    I’m tried to remove/translate the text “Print link” in the receipt emails with no success. Found other threads and tried some things:

    add_action( 'init', 'eddtix_remove_print_tickets_link', 100 );
    
    function eddtix_remove_print_tickets_link() {
        if ( ! class_exists( 'TribeEDDTickets' ) ) return;
        $callback = array( TribeEDDTickets::get_instance(), 'ticket_downloads' );
        remove_filter( 'edd_download_files', $callback, 10, 2 );
    }
    
    add_action( 'init', 'eddtix_remove_print_tickets_link', 100 );
    
    function eddtix_remove_print_tickets_link() {
        if ( ! class_exists( 'Tribe__Events__Tickets__EDD__Main' ) ) return;
        $callback = array( Tribe__Events__Tickets__EDD__Main::get_instance(), 'ticket_downloads' );
        remove_filter( 'edd_download_files', $callback, 10, 2 );
    }

    add_filter( 'edd_email_ticket_receipt', '__return_false' );

    Any of them worked.

    I’m using WPML and all the email strings are OK translated except for the link “Print Ticket”.

    My priority is to remove the link, but if it couldn’t be done, at least I would like to translate it.

    Thanks in advance,

    David.

    #1003491
    Brian
    Member

    Hi David,

    Thanks for using our plugins.

    That wording there does not have a way to translate it. Either it is there or it is removed.

    I have created a ticket to fix that, but for now the best bet is to get the coding to remove it.

    I tried your initial coding and it did not work for me either. I got it to work though when I resent the Purchase Receipt Email.

    So I am not sure why it does not work on the initial email.

    I changed around the coding some and came up with this and it worked for me to remove the Print Ticket:

    add_action( 'edd_download_files', 'eddtix_remove_print_tickets_link', 5 );
    function eddtix_remove_print_tickets_link() {
    if ( ! class_exists( 'Tribe__Events__Tickets__EDD__Main' ) ) return;

    $edd = Tribe__Events__Tickets__EDD__Main::get_instance();

    remove_filter( 'edd_download_files', array( $edd, 'ticket_downloads' ), 10 );

    }

    Add that to your child theme’s funstions.php

    Let me know how that works out.

    Thanks

    #1003585
    puntueus
    Participant

    That worked Brian, thanks!

    Please, let us know if you find any way to translate that string in future versions!

    Thanks,

    David.

    #1003668
    Brian
    Member

    Great glad it helps.

    We will update this ticket once we have a option in a future release to translate it.

    I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Cannot remove / translate the link "print ticket" in the receipt mails’ is closed to new replies.