PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.6
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.6
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 +6 -2 3.1.13.4.6 View file →
@@ -34,9 +34,9 @@
34 34 if( is_array( $data ) && ! empty( $data ) ) {
35 35 return $data;
36 36 }
37 37
38 - $query = 'id, price, name, discounted_price, type, sites';
38 + $query = 'id, price, name, discounted_price, type, sites, coupon';
39 39 $response = $this->http()->query(
40 40 'subscriptionPlans',
41 41 $query
42 42 )->post();
@@ -60,8 +60,10 @@
60 60 'ip' => $_ip,
61 61 'site_url' => $_site_url
62 62 ];
63 63
64 + $postArgs = [];
65 +
64 66 if ( $viaAPI ) {
65 67 $api_key = $this->get_param( 'api_key' );
66 68 $funcArgs['api_key'] = $api_key;
67 69
@@ -90,9 +92,9 @@
90 92 $response = $this->http()->mutation(
91 93 $viaAPI ? 'connectWithApiKey' : 'connect',
92 94 $query,
93 95 $funcArgs
94 - )->post();
96 + )->post($postArgs);
95 97
96 98 if ( is_wp_error( $response ) ) {
97 99 return $response;
98 100 }
@@ -132,8 +134,10 @@
132 134
133 135 unset( $response['user']['reviews'] );
134 136 $meta['reviews'] = $_reviews;
135 137 }
138 +
139 + // No longer need to manage is_live_api state - API selection is now handled by TEMPLATELY_DEV_API constant
136 140
137 141 $this->utils( 'options' )->set( 'user', $response['user'] );
138 142 $response['user']['meta'] = $this->user_meta( $meta );
139 143