mycart email
-
Hello Team,
trust you are fine.
the code below will display the shipping vat on the shipping line as shown in the picture below.
add_filter( 'woocommerce_cart_shipping_method_full_label', 'mytmoney_shows_VAT_included_for_shipping_only', 99, 2 ); function mytmoney_shows_VAT_included_for_shipping_only( $label, $method ) { $label = $method->get_label(); $has_cost = 0 < $method->cost; $hide_cost = ! $has_cost && in_array( $method->get_method_id(), array( 'free_shipping', 'local_pickup' ), true ); $includes = ' <small class="tax_label">(includes ' . wc_price( $method->get_shipping_tax() ) . ' VAT)</small>'; echo $includes; if ( $has_cost && ! $hide_cost ) { if ( WC()->cart->display_prices_including_tax() ) { $label .= ': ' . wc_price( $method->cost + $method->get_shipping_tax() ); if ( $method->get_shipping_tax() > 0 && ! wc_prices_include_tax() ) { $label .= $includes; echo $label; } } else { $label .= ': ' . wc_price( $method->cost ); if ( $method->get_shipping_tax() > 0 && wc_prices_include_tax() ) { $label .= $includes; echo $label; } } } return $label; }
https://snipboard.io/AFnqbg.jpg
The issue is in the email which is received when new order is created, the content is not same as in the picture above – shipping vat is not shown.
https://snipboard.io/Wm280n.jpg
I have added the code in Woocommerce – Email – new order but content does not seem to change.
Kindly help.
Thanks,
Roshan
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘mycart email’ is closed to new replies.