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 337 points!
    / Details
  • Purchase & earn 237 points!
    / Details
  • Purchase & earn 172 points!
    / Details
  • Purchase & earn 236 points!
    / Details
  • Purchase & earn 280 points!
    / Details
  • Purchase & earn 400 points!
    / Details

Title

Go to Top