# fluent-cart/1.3.19/app/Events/License/LicenseRenewed.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.3.19. 54 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.3.19/code/app/Events/License/LicenseRenewed.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.3.19/raw/app/Events/License/LicenseRenewed.php
- Modified: 2025-10-14T16:36:46+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.3.19/code/app/Events/License/LicenseRenewed.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Events\License;

use FluentCart\App\Events\EventDispatcher;
use FluentCart\App\Models\Order;
use FluentCartPro\App\Modules\Licensing\Models\License;

class LicenseRenewed extends EventDispatcher
{

    public string $hook = 'fluent_cart/license_renewed';
    protected array $listeners = [];

    /**
     * @var License
     */
    public License $license;

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

    public function __construct(Order $order, License $license)
    {
        $this->order = $order;
        $this->order->load('customer', 'subscriptions');
        $this->license = $license;
    }


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

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

    public function shouldCreateActivity(): bool
    {
        return true;

    }

}
```
