• Resolved snikolaidis

    (@snikolaidis)


    Hello guys, I would like to ask, on the case of adding programmatically an extra fee (an extra service for example), we use the following method:

    WC()->cart->add_fee()

    Which works just fine. How can this work with TaxCloud in case we want the extra fee to be taxable? Based on WooCommerce documentation, we need to provide the tax class. Since we’re using the TaxCloud service, which class should we add there? Or can we

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Brett Porcelli

    (@bporcelli)

    Simple Sales Tax does not use the WooCommerce Tax Class or Tax Status settings in any way. The only way to control the taxability of products, shipping, and fees with Simple Sales Tax is to assign them an appropriate TaxCloud TIC.

    By default, fees added through the WC fees API are assigned the TIC 10010 (“Charges by the seller for any services necessary to complete the sale (other than delivery or installation)”). You do not need to do anything unless you need to change that default for some reason, in which case you can use the wootax_fee_tic filter.

    Let me know if you have any other questions.

    Thread Starter snikolaidis

    (@snikolaidis)

    Hello Brett, thank you for your reply. Just to make sure that I understood correctly, by using the method:

    WC()->cart->add_fee()

    Will automatically calculate the taxes for this fee?

    Thank you in advance.

    Plugin Author Brett Porcelli

    (@bporcelli)

    That’s right. Any fees added with the WooCommerce fees API will be accounted for in tax calculations automatically.

    Thread Starter snikolaidis

    (@snikolaidis)

    Thank you, Brett! I’ll run my tests, I hope everything will be ok.

    Kind regards,
    Stratos

    Thread Starter snikolaidis

    (@snikolaidis)

    Hello Brett, sorry for keep bugging you, but looks like the following doesn’t work as expected:

    WC()->cart->add_fee($description, $price, true);

    This is what I have in the checkout page:

    View post on imgur.com

    The extra fees are updating the total value but not the taxes.

    Do we need to set them up in the TaxCloud platform?

    Thank you in advance. Best regards,
    Stratos

    Plugin Author Brett Porcelli

    (@bporcelli)

    Hi Stratos,

    SST definitely includes any fees added through WC()->cart->fees_api()->add_fee() in the TaxCloud Lookup request when calculating the sales tax, and I just confirmed this locally.

    With that being said, it’s likely that the default TIC we use for fees (10010) is not taxable in the relevant jurisdictions. If you’re confident that this fee should be taxed according to the applicable tax laws, you can override the default fee TIC and change it to “Uncategorized” (00000) which should be taxable pretty much everywhere. The code would look like this example from the GitHub wiki except with “10040” replaced with “00000”.

    Please reach out to TaxCloud if you need help finding the right TIC to use for your fees.

    Thread Starter snikolaidis

    (@snikolaidis)

    Ah ok, thank you for explaining this to me. I’ll check it through, thank you for your details!

    Best regards,
    Stratos

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Programmatically add taxable fees’ is closed to new replies.