Home › Forums › Ticket Products › Event Tickets Plus › Cannot remove / translate the link "print ticket" in the receipt mails
- This topic has 3 replies, 2 voices, and was last updated 10 years, 7 months ago by
Brian.
-
AuthorPosts
-
September 9, 2015 at 7:50 am #1003279
puntueus
ParticipantHi,
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.
September 9, 2015 at 2:22 pm #1003491Brian
MemberHi 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
September 10, 2015 at 1:27 am #1003585puntueus
ParticipantThat worked Brian, thanks!
Please, let us know if you find any way to translate that string in future versions!
Thanks,
David.
September 10, 2015 at 7:42 am #1003668Brian
MemberGreat 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
-
AuthorPosts
- The topic ‘Cannot remove / translate the link "print ticket" in the receipt mails’ is closed to new replies.
