+ getAllSubscriptions();
+ foreach ($subs->data as $value) {
+ $users_id = $value->metadata->users_id;
+ $plans_id = $value->metadata->plans_id;
- $title = "";
- $body = "";
- $buttonClass = "danger";
+ $title = "";
+ $body = "";
+ $buttonClass = "danger";
- if (!empty($users_id)) {
- $user = new User($users_id);
- if (!empty($user)) {
- $title .= $user->getName() . " (" . $user->getEmail() . ")";
- }
- } else {
- $title .= "User ID Not found";
- }
- if (AVideoPlugin::isEnabledByName("Subscription")) {
- if (!empty($plans_id)) {
- $plan = new SubscriptionPlansTable($plans_id);
- if (!empty($plan)) {
- $title .= " [" . $plan->getName() . "]";
- $row = SubscriptionTable::getSubscription($users_id, $plans_id);
- if (!empty($row)) {
- $buttonClass = "success";
+ if (!empty($users_id)) {
+ $user = new User($users_id);
+ if (!empty($user)) {
+ $title .= $user->getName() . " (" . $user->getEmail() . ")";
+ }
+ } else {
+ $title .= "User ID Not found";
+ }
+ if (AVideoPlugin::isEnabledByName("Subscription")) {
+ if (!empty($plans_id)) {
+ $plan = new SubscriptionPlansTable($plans_id);
+ if (!empty($plan)) {
+ $title .= " [" . $plan->getName() . "]";
+ $row = SubscriptionTable::getSubscription($users_id, $plans_id);
+ if (!empty($row)) {
+ $buttonClass = "success";
+ }
+ }
+ } else {
+ $title .= " [Plan ID Not found]";
}
}
- } else {
- $title .= " [Plan ID Not found]";
+ $body .= "
Created in: " . date("Y-m-d", $value->created);
+ foreach ($value->items->data as $value2) {
+ $body .= "
Plan: " . $value2->plan->nickname;
+ $body .= "
Value: " . StripeYPT::addDot($value2->plan->amount) . " " . $value2->plan->currency;
+ $body .= "
Interval: each " . $value2->plan->interval_count . " " . $value2->plan->interval;
+ }
+ ?>
+
+ Created in: " . date("Y-m-d", $value->created);
- foreach ($value->items->data as $value2) {
- $body .= "
Plan: " . $value2->plan->nickname;
- $body .= "
Value: " . StripeYPT::addDot($value2->plan->amount) . " " . $value2->plan->currency;
- $body .= "
Interval: each " . $value2->plan->interval_count . " " . $value2->plan->interval;
- }
- ?>
-
-
-