fbpx /** * Remove tax for specific roles */ function prefix_exclude_tax_by_role() { if( function_exists( 'WC' ) ) { if( isset( WC()->customer ) ) { $role = WC()->customer->get_role(); if( $role == 'customer_ALS' ) { WC()->customer->set_is_vat_exempt( true ); } else { WC()->customer->set_is_vat_exempt( false ); } } } } add_action( 'wp', 'prefix_exclude_tax_by_role' );
  • Purchase & earn 730 points!
    / Details
  • Purchase & earn 960 points!
    / Details
  • Purchase & earn 591 points!
    / Details
  • Purchase & earn 1,094 points!
    / Details

Title

Go to Top