wc-donation / wc-donation-platform

Donation Platform for WooCommerce unleashes the power of WooCommerce for your online fundraising, crowdfunding & crowdsponsoring
https://www.wc-donation.com/
GNU General Public License v2.0
41 stars 10 forks source link

Payments and fields not loading #19

Closed Cerexus closed 2 years ago

Cerexus commented 2 years ago

Hey,

I have the problem that the payments are not loaded if i add one donation to the cart and want to pay. If i reload the site or add another donation it works.

It apears a loading symbol for a short time and then nothing else happens(desktop&smartphone). Screenshot_20220412-124226_Samsung Internet

If i deactivate the plugin it works as it should. Screenshot_20220412-124303_Samsung Internet

Hopefully someone can help me!

jonas-hoebenreich commented 2 years ago

Hi Cerexus, thanks for reaching out. Apparently the problem was introduced in the latest version of the WooCommerce PayPal plugin. I'm currently investigating the issue, trying to find a solution and will hopefully release a fix in the next version. Best, Jonas

jonas-hoebenreich commented 2 years ago

https://github.com/woocommerce/woocommerce-paypal-payments/issues/499

jonas-hoebenreich commented 2 years ago

It looks like the following code should solve the problem. I recommend you add it with code snippets. I look forward to your feedback on whether it works for you:

add_filter('woocommerce_cart_get_cart_contents_total', function($total) {
    if ($total == 0) {
        return 1;
    }
    return $total;
});

I will add the fix in the next update.

Cerexus commented 2 years ago

Thanks for your very fast help! It works perfectly with your snippet! :)

I have another question to you. Maybe its not the right place, but however..
Is it somehow possible to create Donation 5 for 5$, Donation 10 for 10$ and Donation X for any value? (3 different products)

I really need to have different "products" for different values bc some other plugins only work in that way. I tested a bit, but i really dont get it like that..

Thank you for helping!

jonas-hoebenreich commented 2 years ago

I'm afraid I don't quite understand what you're trying to achieve. Do you mean that the minimum/maximum amount for a donation should be different for each product? Or that the suggested amounts should be different? Or should a product have a fixed price that the supporter cannot adjust?

jonas-hoebenreich commented 2 years ago

fixed in https://github.com/jonas-hoebenreich/wc-donation-platform/releases/tag/v1.2.4