# fluent-cart/1.6.4/app/Events/Order/OrderCanceled.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 53 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Events/Order/OrderCanceled.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Events/Order/OrderCanceled.php
- Modified: 2026-06-11T12:21:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Events/Order/OrderCanceled.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Events\Order;

use FluentCart\App\Models\Order;
use FluentCart\App\Events\EventDispatcher;
use FluentCart\App\Listeners;


class OrderCanceled extends EventDispatcher
{
    public string $hook = 'fluent_cart/order_canceled';

    protected array $listeners = [
        Listeners\Order\OrderDeleted::class,
//        Listeners\UpdateStock::class
    ];

    /**
     * @var Order $order
     */
    public Order $order;

    public function __construct(Order $order)
    {
        $this->order = $order;
        $this->order->load('customer', 'shipping_address', 'billing_address');
    }

    public function toArray(): array
    {
        return [
            'order'    => $this->order,
            'customer' => $this->order->customer ?? [],
        ];
    }

    public function getActivityEventModel()
    {
        return $this->order;
    }

    public function afterDispatch()
    {
        do_action($this->hook, $this->toArray());
    }

    public function shouldCreateActivity(): bool
    {
        return true; // TODO: Change the autogenerated stub
    }
}

```
