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

Support for Donations #45

Open
ragnarfrosti opened this issue Jun 3, 2021 · 0 comments
Open

Support for Donations #45

ragnarfrosti opened this issue Jun 3, 2021 · 0 comments

Comments

@ragnarfrosti
Copy link

Craft has a build in donation functionality but if an order has a donation in it the mailchimp sync will fail and you will be returned to the payment screen again with the following error (even though the order goes through):

Calling unknown method: craft\commerce\elements\Donation::getProduct()

The problem is that the Donation doesn't have any getProduct() function.

I found this call in two files in the plugin:

OrdersService.php > _getProduct($purchasable):
....
return $purchasable->getProduct();

And

ProductsService.php > _getProductFromVariant($purchasable):
...
return $purchasable->getProduct();
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

1 participant