Support » Plugin: Multiple Packages for WooCommerce » Conflict with Simple Sales Tax

  • Hi there,

    My name is Brett Porcelli and I’m the developer of Simple Sales Tax (https://simplesalestax.com). I’ve discovered a conflict between my plugin and yours and I was hoping you can help me to fix it.

    The conflict arises from the fact that the BE_Multiple_Packages::generate_packages() method does not preserve the cart item keys. Packages that start looking like this…

    [
    0 => [
    ‘destination’ => …,

    ‘contents’ => [
    ‘a3jdmaksd7231nasdjaskdj’ => […]
    ],
    ],
    ]

    … end up looking like this:

    [
    0 => [
    ‘destination’ => …,

    ‘contents’ => [
    0 => […]
    ],
    ],
    ]

    This can be problematic for plugins like mine that expect the original package structure and cart item keys to be preserved.

    I’ve updated the generate_packages() method to preserve the original cart item keys. Here’s a patched version of the main plugin file: https://gist.github.com/bporcelli/19a89915c1fb39e107a24464c539e32f

    Please let me know if you have any questions or concerns!

    Best,
    Brett

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bolder Elements

    (@hystericallyme)

    Hi Brett, thanks for contacting me to let me know about this conflict! I am happy to take a look into your changes and apply a similar fix to the upcoming 2.0 update. The structure is quite different, but I will ensure the keys for the cart items so it does cause any further trouble.

    Thanks! I appreciate your quick response.

    I’m aware that the full cart package structure is quite different – I’m showing a (very) truncated version in my post. You should find that my patch preserves every aspect of the package structure other than the keys of the items in the ‘contents’ array.

    Plugin Author Bolder Elements

    (@hystericallyme)

    Just a quick update: I’ve decided to release a couple minor updates before the 2.0 update so I have merged your changes into the next version. You should be safe to upgrade again after the next update (1.2+) but let me know if you run into any issues!

    Awesome, thanks for the update!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.