subscription = $subscription; $this->order = $order; $this->customer = $customer; $this->reason = $reason; } public function toArray(): array { return [ 'subscription' => $this->subscription, 'order' => $this->order, 'customer' => $this->customer ?? [], 'reason' => $this->reason ?: __('Subscription validity expired', 'fluent-cart'), ]; } /** * @return Subscription */ public function getActivityEventModel() { return $this->subscription; } public function shouldCreateActivity(): bool { return true; } }