PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.7.5
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.7.5
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/API/Login.php +10 -4 3.7.23.7.5 View file →
@@ -47,21 +47,23 @@
47 47 ];
48 48 }
49 49
50 50 public function pricing(){
51 - $data = get_transient( "templately_subscriptions" );
51 + $data = get_transient( "templately_subscriptions_v2" );
52 52
53 53 if( is_array( $data ) && ! empty( $data ) ) {
54 54 return $data;
55 55 }
56 56
57 - $query = 'id, price, name, discounted_price, type, sites, coupon';
57 + // Field set drives the Subscription screen's plan comparison grid, so it
58 + // carries the per-plan limits too, not just price/sites.
59 + $query = 'id, price, name, slug, discounted_price, type, sites, coupon, my_cloud_items, pro_items, workspace, fsi_limit, ai_credit, description';
58 60 $response = $this->http()->query(
59 61 'subscriptionPlans',
60 62 $query
61 63 )->post();
62 64
63 - set_transient( "templately_subscriptions", $response, WEEK_IN_SECONDS );
65 + set_transient( "templately_subscriptions_v2", $response, WEEK_IN_SECONDS );
64 66
65 67 return $response;
66 68 }
67 69
@@ -105,9 +107,13 @@
105 107 if ( ! empty( $errors ) ) {
106 108 return $this->error( 'login_error', $errors, 'login', 400 );
107 109 }
108 110
109 - $query = 'status, message, user{ id, name, first_name, last_name, display_name, email, profile_photo, joined, is_verified, is_company_user, api_key, plan, plan_expire_at, my_cloud{ limit, usages, last_pushed }, favourites{ id, type }, show_notice, reviews{ type, type_id, rating }, subscription { id, name, sites } }';
111 + // `ends_at`, `plan_type` and `cancel_at_period_end` drive the Subscription
112 + // screen's renewal line. They are asked for instead of leaning on
113 + // `plan_expire_at`, which the API resolves with `empty($subscription->ends_at)
114 + // ?? …` — a boolean that never falls through, so it never carries a date.
115 + $query = 'status, message, user{ id, name, first_name, last_name, display_name, email, profile_photo, joined, is_verified, is_company_user, is_restricted_company_user, api_key, plan, plan_expire_at, my_cloud{ limit, usages, last_pushed }, favourites{ id, type }, show_notice, reviews{ type, type_id, rating }, subscription { id, name, sites, subscription_plan_id, ends_at, plan_type, cancel_at_period_end } }';
110 116
111 117 $response = $this->http()->mutation(
112 118 $viaAPI ? 'connectWithApiKey' : 'connect',
113 119 $query,