Status active subscriptions
-
Hi,
Why is a subscription with “CANCELLED” status considered an active subscription?
public function get_active_subscriptions($include_trial = true) { $statuses = [ SubscriptionStatus::ACTIVE, SubscriptionStatus::COMPLETED, SubscriptionStatus::CANCELLED ]; if ($include_trial) $statuses[] = SubscriptionStatus::TRIALLING; $subs = $this->get_subscriptions($statuses); $result = []; if ( ! empty($subs)) { foreach ($subs as $sub) { if ($sub->is_active() && ! $sub->is_expired()) $result[] = $sub; } } return $result; }
Is it possible to add a filter on the “get_active_subscriptions” ?
apply_filters('ppress_status_active_subscriptions', $statuses);
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Status active subscriptions’ is closed to new replies.