Open ArisB52 opened 5 months ago
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...
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.
@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.
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'.