<p>Donations are like anything else, and can be bought along side regular products so they are a part of normal orders.</p>

<p>You can use the event below to inspect the order and choose youre own default status if you want.</p>

<pre><code>use craft\commerce\events\DefaultOrderStatusEvent;
use craft\commerce\services\OrderStatuses;
use yii\base\Event;

Event::on(OrderStatuses::class, OrderStatuses::EVENT_DEFAULT_ORDER_STATUS, function(DefaultOrderStatusEvent $e) {
 // Do something - perhaps figure out a better default order statues than the one set in CP
 // $e-&gt;order
 // $e-&gt;orderStatus (the order status to set as the default for this order)
});
</code></pre>

CC BY-SA 4.0
2019-03-13T13:56:27.463Z
That seems like a good option for me, as currently we're only allowing 1 item in the cart either a Product or Donation. So i'll give this a go.
Jason Mayo
CC BY-SA 4.0
2019-03-13T13:49:02.913Z
2019-03-13T13:49:02.913Z
Luke Holder
<p>Currently trying to use the new Donations feature of Commerce 2 - <a href="https://docs.craftcms.com/commerce/v2/donations.html" rel="nofollow noreferrer">https://docs.craftcms.com/commerce/v2/donations.html</a></p>

<p>The order goes through fine and I can see the donation purchasable in the order.</p>

<p>What I can't do though is get it to assign the status of <code>Donation</code> to the donation/order. It currently comes through as a <code>New</code> status.</p>

<p>This is extremely handy to break apart Orders from Donations and vice versa.</p>

<p>Is there a way to set the donation status as default to all donations, or somehow assigning the status to the donation via the form when the payment is processed? </p>

<plugin-craftcommerce><plugin-craftcommerce2><donations>
Donation Status Commerce 2
# Donation Status Commerce 2

(Asked by: username_0 on 2019-03-13)

Currently trying to use the new Donations feature of Commerce 2 - <https://docs.craftcms.com/commerce/v2/donations.html>

The order goes through fine and I can see the donation purchasable in the order.

What I can't do though is get it to assign the status of `Donation` to the donation/order. It currently comes through as a `New` status.

This is extremely handy to break apart Orders from Donations and vice versa.

Is there a way to set the donation status as default to all donations, or somehow assigning the status to the donation via the form when the payment is processed?

**Tags:** plugin-craftcommerce, plugin-craftcommerce2, donations


---

## 1 answers

### Answer by username_1 on 2019-03-13. Score: 2 | Accepted answer

Donations are like anything else, and can be bought along side regular products so they are a part of normal orders.
You can use the event below to inspect the order and choose youre own default status if you want.
use craft\commerce\events\DefaultOrderStatusEvent;
use craft\commerce\services\OrderStatuses;
use yii\base\Event;

Event::on(OrderStatuses::class, OrderStatuses::EVENT_DEFAULT_ORDER_STATUS, function(DefaultOrderStatusEvent $e) {
 // Do something - perhaps figure out a better default order statues than the one set in CP
 // $e->order
 // $e->orderStatus (the order status to set as the default for this order)
});

> **Comments:**
> **username_0**: That seems like a good option for me, as currently we're only allowing 1 item in the cart either a Product or Donation. So i'll give this a go.  

---

