--- post_title: Code snippets for configuring special tax scenarios menu_title: Configuring special tax scenarios tags: code-snippet, tax current wccom url: https://woocommerce.com/document/setting-up-taxes-in-woocommerce/configuring-specific-tax-setups-in-woocommerce/#configuring-special-tax-setups --- ## Scenario A: Charge the same price regardless of location and taxes If a store enters product prices including taxes, but levies various location-based tax rates, the prices will appear to change depending on which tax rate is applied. In reality, the base price remains the same, but the taxes influence the total. [Follow this link for a detailed explanation](https://woocommerce.com/document/how-taxes-work-in-woocommerce/#cross-border-taxes). Some merchants prefer to dynamically change product base prices to account for the changes in taxes and so keep the total price consistent regardless of tax rate. Enable that functionality by adding the following snippet to your child theme's functions.php file or via a code snippet plugin. ```php cart->subtotal <= 110 ) $tax_class = 'Zero Rate'; return $tax_class; } ``` ## Scenario C: Apply different tax rates based on the customer role Some merchants may require different tax rates to be applied based on a customer role to accommodate for wholesale status or tax exemption. To enable this functionality, add the following snippet to your child theme's functions.php file or via a code snippet plugin. In this snippet, users with “administrator” capabilities will be assigned the **Zero rate tax class**. Adjust it according to your requirements. ```php