Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surcharge/Fee compatibility issues #895

Open
ArisB52 opened this issue Mar 28, 2024 · 3 comments
Open

Surcharge/Fee compatibility issues #895

ArisB52 opened this issue Mar 28, 2024 · 3 comments

Comments

@ArisB52
Copy link

ArisB52 commented Mar 28, 2024

The Mollie-plugin is visually removing fee's added by other plugin's on the checkout-page.

When a payment method is selected an Ajax-call is made which hides all wc-block-components-totals-fees blocks. It then recalculates the cart and adds its own surcharge. While recalculating it does not take the other plugins fee's into account lowering the order total. So now any additional fee's on the checkout-page are hidden from view and subtracted from the total. This also occurs when payment surcharges set to 'no fee'.

P.S. There is also a typo in the action name, it is called 'mollie_checkout_blocks_surchage'.

@WebWrotter
Copy link

Exactly this! I'm trying to add a custom fee based on a ACF setting. But Mollie constantly removes my fee. Is there any way to stop this by using a hook or a workaround? I tried adding the fee using javascript, but no luck so far...

@ArisB52
Copy link
Author

ArisB52 commented Jul 10, 2024

I've found a workaround, but it's a bit of a hack. Since I don't utilize payment fees, I've disabled the fee hiding function within the Mollie Payments for WooCommerce plugin. Specifically, I located the function 'handleFees' in the file mollieBlockIndex.min.js at line 105 and added a 'return;' statement below it. This file is located in:

../wp-content/plugins/mollie-payments-for-woocommerce/public/js/

However, I need to redo this modification each time the plugin updates. To achieve a more permanent solution, it should be considered adding an additional class to the fees, such as 'wc-block-components-totals-fees-mollie' or so, and managing them accordingly by deleting and re-adding as necessary.

@WebWrotter
Copy link

WebWrotter commented Jul 10, 2024

@ArisB52 Ah yes I found the file where the fees are handled withing Mollie. I clearly don't see why Mollie would remove all fees and not just their own if necessary.

Modifying their plugin file is not a solution for me because i'm not constantly on this webshop. I need a more permanent solution so I will look further into this. If I find something, I ofcourse will let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants