• Resolved ArtbyPatrick

    (@artbypatrick)


    I have been searching to see if there is a way to add a tax amount on an order IF and only IF a customer as selected any of the add-ons that are appearing on a product.

    So far, I haven’t found a solution to this.

    The product is in-person art classes and there are several add-ons available for the student to purchase such as clay, paintbrushes, etc. All these add-on have their respected fees. If none of them are selected, no problem the order goes through without a hitch.

    But if they select an add-on, the fee is added on to the order, no problem there, but I also have to add the tax rate to that add-on.

    Is this do-able?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there @artbypatrick,

    Yes, it is absolutely possible to add a tax amount to the add-ons in WooCommerce. You can accomplish this by setting up tax classes and rates for your add-ons. Here are the steps:

    1. Go to WooCommerce > Settings > Tax.
    2. Set up a tax class for your add-ons.
    3. Then, under ‘Tax rates’ for the respective tax class, you can define the tax rate for your add-ons.
    4. Finally, when creating or editing your product, under ‘Product data’ > ‘General’ > ‘Tax status’, select ‘Taxable’, and for ‘Tax class’, select the tax class you set up for your add-ons.

    You can learn more details on setting up taxes from our guide.

    I hope this helps.

    Thread Starter ArtbyPatrick

    (@artbypatrick)

    If I read you correctly, this will add tax no matter what on the product. Won’t it?

    Or is it only going to be charged when a customer selects an add-on on the product?

    Saif

    (@babylon1999)

    Hello @artbypatrick,

    Or is it only going to be charged when a customer selects an add-on on the product?

    To confirm, you want to check if there are add-ons added to the product, and only then, apply the tax, correct?

    I’m afraid this will require a custom solution, which is not something we can provide support for per our support policy. Also, given this is related to the Product Add-Ons extension, I’m not sure if other contributors here will be able to help.

    As a hint, these add-ons are added to the WC_Session so you can run some conditional logic to check if there are add-ons in the session, and if yes, remove the calculated tax.

    If you’d like to hire someone to help you with this, consider checking the list of vetted WooExpert agencies here.

    Let us know if you have any other questions!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding tax to an order IF an add-on to a product has been selected’ is closed to new replies.