| @@ -12,16 +12,18 @@ | ||
| 12 | 12 | public string $hook = 'fluent_cart/subscription_reactivated'; |
| 13 | 13 | protected array $listeners = []; |
| 14 | 14 | |
| 15 | 15 | public Subscription $subscription; |
| 16 | + public ?Customer $customer; | |
| 16 | 17 | public ?Order $order; |
| 17 | - public ?Customer $customer; | |
| 18 | + public ?string $oldStatus; | |
| 18 | 19 | |
| 19 | - public function __construct(Subscription $subscription, ?Order $order = null, ?Customer $customer = null) | |
| 20 | + public function __construct(Subscription $subscription, ?Order $order = null, ?Customer $customer = null, ?string $oldStatus = null) | |
| 20 | 21 | { |
| 21 | 22 | $this->subscription = $subscription; |
| 22 | 23 | $this->order = $order; |
| 23 | 24 | $this->customer = $customer; |
| 25 | + $this->oldStatus = $oldStatus; | |
| 24 | 26 | } |
| 25 | 27 | |
| 26 | 28 | public function toArray(): array |
| 27 | 29 | { |
| @@ -27,9 +29,10 @@ | ||
| 27 | 29 | { |
| 28 | 30 | return [ |
| 29 | 31 | 'subscription' => $this->subscription, |
| 30 | 32 | 'order' => $this->order, |
| 31 | - 'customer' => $this->customer, | |
| 33 | + 'customer' => $this->customer ?? [], | |
| 34 | + 'old_status' => $this->oldStatus, | |
| 32 | 35 | ]; |
| 33 | 36 | } |
| 34 | 37 | |
| 35 | 38 | public function getActivityEventModel() |