The issue is not simply assigning a user as "SE - Forhandler," but rather what happens when a user browses the site while being assigned this role.
Issue Summary:
When a user with the role "SE - Forhandler" logs in and tries to navigate the site, the site crashes with a fatal error.
The error occurs only when WooCommerce Multilingual & Multicurrency is active. If I disable this plugin, the issue disappears.
Error Details:
The error message states: "DivisionByZeroError: Division by zero in class-wcml-multi-currency-prices.php:427".
This suggests that WooCommerce Multilingual is trying to convert a price or shipping cost before a valid value has been set.
Reproduction Steps:
1. Log in as a user with the role "SE - Forhandler".
2. Browse the site.
3. The site crashes with the fatal error related to WooCommerce Multilingual.
What I Have Tested:
✔ Deactivating WPML Multicurrency → Site chrashes.
✔ Deactivating Shipmondo → Site works.
✔ Updating all plugins → No change.
✔ Testing on a staging site → Same issue occurs.
Next Steps:
Can you confirm if WPML Multicurrency is triggering the issue by trying to convert a price that has not yet been set?
Is there a way to prevent WooCommerce Multilingual from attempting to convert shipping costs before they exist?
The issue occurs when a user with the role "SE - Forhandler" is logged in and browses the site.
Steps to Reproduce the Issue:
1. Log in as a user with the role "SE - Forhandler" (e.g., the "b2bking" test user I have set up).
2. Navigate to hidden link.
3. The site crashes with the DivisionByZeroError from WooCommerce Multilingual.
Key Observations:
- The issue only occurs when logged in as "SE - Forhandler".
- If I log in as a regular customer, the site works fine.
- The fatal error is caused by WCML Multi-Currency, as disabling this plugin resolves the issue.
Can you please log in as a "SE - Forhandler" user, browse the site, and confirm if you experience the same crash?
This seems to be a complex compatibility issue between B2BKing PRO, Shipmondo and WCML.
To assist you on this matter we need to be able to recreate the issue on a test site (which we will provide) to confirm if this is a general issue.
After that, I will escalate the issue internally for further revision by the compatibility team.
The issue here is, that we can not test the plugin without having a paid Shipmondo plan and sadly Shipmondo is not yet one of our partners.
Would you be able to install the Shipmondo and the B2BKing plugins in their latest available version on a test site which I will provide, so that we can try to recreate the issue and work on a solution?
We need to take this step to confirm if we ar handling a general issue.