On my WooCommerce web site I use Woocommerce Order Barcodes to display a order barcodes on email notifications.
I would like to hide or remove this barcode and display it ONLY on completed order status email notifications.
I have tried to edit the plugin file (I know this is not recommended). I have removed this (line 128 - 129) in class-woocommerce-order-barcodes.php
plugin file:
// Add barcode to order complete email
add_action( 'woocommerce_email_after_order_table', array( $this, 'get_email_barcode' ), 1, 1 );
But it removes the barcodes from all email notifications.
How can I remove these barcodes from email notification and show it only on completed email notification?
Thanks