Hey @petervandoorn,
Yes, you absolutely can. Here is some sample code you can add to your theme functions.php file that should work:
function remove_unwanted_email_message() {
// remove teh two filters that add the message
add_action( 'woocommerce_email_before_order_table', array( 'QSOT_tickets', 'maybe_order_tickets_link_email' ), 10, 3 );
add_action( 'woocommerce_email_after_order_table', array( 'QSOT_tickets', 'maybe_order_tickets_link_email' ), 10, 3 );
}
add_action( 'init', 'remove_unwanted_email_message', 10000 );
Note that I do this on the ‘init’ action. It needs to happen at least this late in execution, because if you do it too early, the filters will not yet be defined, which means the code would do nothing.
Let me know if this helps,
Loushou
No, that didn’t work. I think you meant this:
function remove_unwanted_email_message() {
// remove the two filters that add the message
remove_action( 'woocommerce_email_before_order_table', array( 'QSOT_tickets', 'maybe_order_tickets_link_email' ), 10, 3 );
remove_action( 'woocommerce_email_after_order_table', array( 'QSOT_tickets', 'maybe_order_tickets_link_email' ), 10, 3 );
}
add_action( 'init', 'remove_unwanted_email_message', 10000 );
That works 😉
Cheers