VAT Number in WooCommerce Emails – if empty dont’t show

Is it possible that the NIP label and company name will not be displayed in the e-mail if the customer does not provide them. I use this code:

add_filter( ‘woocommerce_email_order_meta_keys’, ‘wpdesk_vat_number_display_email’ );
/**
* VAT Number in emails
*/
function wpdesk_vat_number_display_email( $keys ) {
$keys[‘VAT Number’] = ‘_vat_number’;
return $keys;
}

code comes from: https://www.wpdesk.net/blog/vat-eu-woocommerce/

Read more here:: VAT Number in WooCommerce Emails – if empty dont’t show

Leave a Reply

Your email address will not be published. Required fields are marked *