Advertisement
Guest User

show tax rates on single product page

a guest
Jul 14th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. add_action( 'woocommerce_before_add_to_cart_form', 'exbtw_melding', 20 );
  2.  
  3. function exbtw_melding(){
  4.         global $product;
  5. //        $tax_rates = $product->get_tax_class();
  6.         $tax_rates = WC_Tax::get_rates( $product->get_tax_class() );
  7. //        $tax_rates = $product->get_rates(get_tax_rates());
  8.         echo 'Alle vermelde prijzen zijn excl. <b>'. $tax_rates . ' BTW</b> / Tous les prix indiquΓ©s sont hors <b> '. $tax_rates . ' TVA</b>';
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement