• Resolved tristanmason

    (@tristanmason)


    Hello, we’re using the standard WooCommerce $cart->add_fee() method to allow donors to add a voluntary donation covering processing costs.

    However, the fee is showing as a line item, which is causing problems with 2 sync plugins (Shipstation and Quickbooks sync) interpreting the fee as a product:

    <Items><Item><LineItemID><![CDATA[135282]]></LineItemID><Name><![CDATA[Card processing fee]]></Name><Quantity>1</Quantity><UnitPrice>1.17</UnitPrice></Item></Items>

    Is this normal behavior for add_fee()? Are we doing something wrong, or is it a bug in the sync plugins that they can’t tell the difference between a fee and a product?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @tristanmason

    The behavior you’re experiencing is actually normal. The $cart->add_fee() method in WooCommerce is designed to add a fee as a line item. This is because it’s typically used for adding additional costs that are not part of the product price, like handling fees or insurance costs. These fees are added as separate line items so they can be clearly displayed and calculated separately in the cart and checkout.

    The challenge you’re facing with your sync plugins, Shipstation and Quickbooks sync, is that they are interpreting the fee as a product. This isn’t technically a bug in the plugins but more of a discrepancy in how they process data from WooCommerce.

    In this case, there are a couple of potential solutions:

    1. You could reach out to the support teams for the Shipstation and Quickbooks sync plugins to see if they have a solution for distinguishing between products and fees.
    2. You could also consider customizing the way your site applies these fees, so they’re not added as line items. This would likely involve custom development work, so you may want to consult with a developer if you choose to go down this route.
    3. Alternatively, you could consider using a different approach to add the donation. For example, you could create the donation as a virtual product in WooCommerce. This way, it would be treated as a product across all plugins and systems, which might resolve the sync issue you’re facing.

    I hope this helps clarify the situation. If you have any further questions or if there’s anything else we can assist you with, please don’t hesitate to ask.

    Thanks!

    Thread Starter tristanmason

    (@tristanmason)

    @shameemreza Thanks for taking the time to provide this thorough reply! I reached out to the Shipstation extension support team, and they’re looking into this. In the meantime, #3 is a good, workable solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘$cart->add_fee() method causing sync issue’ is closed to new replies.