PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.0.8
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.0.8
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/Profile.php +3 -17 3.7.23.0.8 View file →
@@ -64,20 +64,8 @@
64 64 unset( $response['user']['reviews'] );
65 65 $meta['reviews'] = $_reviews;
66 66 }
67 67
68 - if ( ! empty( $response['user'] ) && is_array( $response['user'] ) ) {
69 - /**
70 - * The cloud API key must never be persisted here or sent to the client.
71 - * Under a global login this key belongs to the admin, while any user with
72 - * `delete_posts` can reach this endpoint. Login and SignUp already drop it.
73 - */
74 - unset( $response['user']['api_key'] );
75 -
76 - $response['user']['site_url'] = base64_encode( home_url( '/' ) );
77 - $response['user']['ip'] = Helper::get_ip();
78 - }
79 -
80 68 $this->utils( 'options' )->set( 'user', $response['user'] );
81 69 $response['user']['meta'] = Login::get_instance()->user_meta( $meta );
82 70
83 71 return $this->success( $response );
@@ -89,9 +77,9 @@
89 77 ];
90 78
91 79 $response = $this->http()->query( 'isVerifiedUser', '', $funcArgs )->post();
92 80
93 - if ( $response && !is_wp_error( $response ) ) {
81 + if ( $response ) {
94 82 $user = $this->utils( 'options' )->get( 'user' );
95 83
96 84 $user['is_verified'] = true;
97 85 $this->utils( 'options' )->set( 'user', $user );
@@ -110,9 +98,9 @@
110 98 "page" => $page
111 99 ] )->post();
112 100
113 101 if ( is_wp_error( $response ) ) {
114 - return $this->error( 'invalid_download_history_response', __( $response->get_error_message(), 'templately' ), 'profile/download-history' );
102 + return $this->error( 'invalid_download_history_response', __( $response->get_error_message(), 'templately' ), 'profile/download-history', $response->get_error_code() );
115 103 }
116 104
117 105 if ( isset( $response['total'] ) ) {
118 106 $this->utils( 'options' )->set( 'total_download_counts', $response['total'] );
@@ -141,9 +129,9 @@
141 129
142 130 $response = $this->http()->mutation( 'myFavouriteItem', 'total_page, current_page, data { id, name, rating, type, slug, favourite_count, thumbnail, thumbnail2, thumbnail3, price, author{ display_name, name, joined }, dependencies{ id, name, icon, plugin_file, plugin_original_slug, is_pro, link } }', $funcArgs )->post();
143 131
144 132 if ( is_wp_error( $response ) ) {
145 - return $this->error( 'invalid_my_favourites_response', __( $response->get_error_message(), 'templately' ), 'profile/my-favourites' );
133 + return $this->error( 'invalid_my_favourites_response', __( $response->get_error_message(), 'templately' ), 'profile/my-favourites', $response->get_error_code() );
146 134 }
147 135
148 136 return $response;
149 137 }
@@ -151,13 +139,11 @@
151 139 public function get_my_purchased_items() {
152 140 $page = $this->get_param( 'page', 1, 'intval' );
153 141 $per_page = $this->get_param( 'per_page', 10, 'intval' );
154 142 $_all = $this->get_param( 'all', false );
155 - $platform = $this->get_param( 'platform', 'elementor' );
156 143
157 144 $funcArgs = [
158 145 'api_key' => $this->api_key,
159 - 'platform' => $platform,
160 146 'page' => $page,
161 147 'per_page' => $per_page
162 148 ];
163 149