Revisions
-
kloon revised this gist
Aug 22, 2013 . 1 changed file with 8 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,13 @@ <?php add_filter( 'init', 'wc_tax_exempt_user_roles' ); function wc_tax_exempt_user_roles() { if ( ! is_admin() ) { global $woocommerce; if ( current_user_can('wholesaler') || current_user_can('distributor') ) { $woocommerce->customer->set_is_vat_exempt(true); } else { $woocommerce->customer->set_is_vat_exempt(false); } } } ?> -
kloon created this gist
Aug 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <?php add_filter( 'init', 'wc_tax_exempt_user_roles' ); function wc_tax_exempt_user_roles() { global $woocommerce; if ( current_user_can('wholesaler') || current_user_can('distributor') ) { $woocommerce->customer->set_is_vat_exempt(true); } else { $woocommerce->customer->set_is_vat_exempt(false); } } //end wc_tax_exempt_user_roles ?>