Skip to content

Support for Donations #45

@ragnarfrosti

Description

@ragnarfrosti

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions