Reply To: Compatible with any email customiser template plugins?

Tom Anbinder
Plugin Support

Hi Lucy,

I think I found a solution – I’m going to include it in the next plugin version; however, if you are ok with adding a small PHP snippet to your site, this will add EANs to the VillaTheme’s customizer plugin emails:

add_action( 'viwec_order_item_parts', function ( $item_id, $item, $order ) {
    if ( function_exists( 'alg_wc_ean' ) && false !== ( $ean = alg_wc_ean()->core->get_ean_from_order_item( $item ) ) ) {
        printf( '<p><strong>EAN:</strong> %s</p>', $ean );
}, 10, 3 );

Please give it a try and let me know what you think.