User role condition
-
I need to charge an extra fee at checkout depending on payment gateway and user role, is it possible?
-
Hi, yes, it’s possible with custom filters:
https://github.com/vyskoczilova/woocommerce-payforpayment#filter-woocommerce_pay4pay_current_gateway_id_amountThank you FOR you reply Karoline. Unfortunately plugin causes an error, I think it´s due to the fact that I am using Mercadopago.
Hi, yeah, could you have a look on this thread? The Mercadopago causes me a lot of gray hairs and I really love to have the issue fixed: https://ww.wp.xz.cn/support/topic/critical-error-whit-payment-mode/
I’m really glad to assist.
First I had installed plugin from e and I got error message. Now I downloaded it your last version from repository and it works, but when comfirming payment, fee is not charged by Mercadopago, it ignores it.
@marce1963 Yeah, the same was reported but I’m afraid that this might be caused by Mercadopago.
Could you try to add another fee from the WooCommerce example and check if it’s passed to payment gateway? I think the first example would work just fine (you could change the percentage surcharge to something like 100% so you can see it on the first sign).
https://docs.woocommerce.com/document/add-a-surcharge-to-cart-and-checkout-uses-fees-api/#section-1
or do the same by another plugin, maybe that one: https://cs.ww.wp.xz.cn/plugins/woocommerce-extra-fee-option/
Does it ignore the fee or not?
I can’t reproduce the issue myself since I don’t have the payment gateway so I need a bit of help here (or maybe you can contact support to get in touch with me).
Have a good night!
KarolinaKarolina, I appreciate your interest in solving this issue. I don´t remember exactly which, but I tried other plugin last week without success. Also, I added custom code to my functions.php and same situation: fee is calculated and shown but Mercadopago does not charge it.
Unfortunately I do not have any other payment method activated for my web, so I cannot test plugin easily. I will download stripe plugin and test.
Meanwhile, I just sent a messagge to Mercado Pago Developers site, buy already did it some days ago when tested custom code and had no reply yet.
I will keep you informed!
Hi @marce1963 so I’m afraid that this is not caused by my plugin any longer, it’s the way how is the Mecadopago implemented to WooCommerce.
I’ll merge the latest changes to the plugin (so no more errors) and try to write them again. To be honest, I have no idea why they are not answering 🙁
I’ll keep you posted to and thanks once again.
The topic ‘User role condition’ is closed to new replies.