• Resolved WeDev.Africa

    (@mad2kx)


    Hello,

    We run a multi-vendor store and for all external products (uploaded by vendors) we need tax calculation to be disabled. At the moment we have to manually change the tax status for every single vendor product. Is there an easier way to do this? We only want tax calculation enabled for our “internal products”.

    Regards,

    Martin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello Martin!

    Thanks for reaching out!

    We run a multi-vendor store and for all external products (uploaded by vendors) we need tax calculation to be disabled. At the moment we have to manually change the tax status for every single vendor product. Is there an easier way to do this? We only want tax calculation enabled for our “internal products”.

    One thing you can do is bulk edit the tax status for external products by filtering them first based on product type, category, or any other common identifying tags.

    If the above is not applicable to your case, please let us know what plugin/extension you are using for your multi-vendor setup so that we can help you better.

    Thanks!

    Thread Starter WeDev.Africa

    (@mad2kx)

    Hi @tamirat22 ,

    Thanks for the fast response.

    I am aware of the bulk edit function but was hoping for another solution to rather make vendor products tax-exempted from the onset and then only add tax for products if required.

    Anyhow, we are making use of Dokan

    Hello,

    You can try this alternative solution that uses custom code, you can add the code to your functions.php file or use a plugin like Code Snippets to do this for you.

    Please check: Enabling “Zero rate” tax class to some specific user roles.

    Let us know how it goes.

    Thread Starter WeDev.Africa

    (@mad2kx)

    Hi @ihereira,

    Thanks for the suggestion but it does not work. I added this code into my functions.php and it does literally nothing to newly added products

    function wc_diff_rate_for_user( $tax_class, $product ) {
        // Getting the current user 
        $current_user = wp_get_current_user();
        $current_user_data = get_userdata($current_user->ID);
    
        if ( in_array( 'administrator', $current_user_data->roles ) || in_array( 'reseller', $current_user_data->roles ) )
            $tax_class = 'Zero Rate';
    
        return $tax_class;
    }
    add_filter( 'woocommerce_product_get_tax_class', 'wc_diff_rate_for_user', 10, 2 );
    add_filter( 'woocommerce_product_variation_get_tax_class', 'wc_diff_rate_for_user', 10, 2 );

    Hello,

    There are two ways to add custom code on your site, one is directly touching the functions.php file, and the other is using a plugin like Code Snippets to add custom PHP code into your site without directly accessing the functions.php file. Here is an article that explains how to use the Code Snippets plugin.

    Does the code work this way? If not please provide us with the following:

    Please send a copy of your site’s System Status, It is under WooCommerce > Status. Select “Get system report” and then “Copy for support”.?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set all products to non-taxable’ is closed to new replies.