PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.3.0
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.3.0
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 -10 3.6.43.3.0 View file →
@@ -64,13 +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 - $response['user']['site_url'] = base64_encode( home_url( '/' ) );
70 - $response['user']['ip'] = Helper::get_ip();
71 - }
72 -
73 68 $this->utils( 'options' )->set( 'user', $response['user'] );
74 69 $response['user']['meta'] = Login::get_instance()->user_meta( $meta );
75 70
76 71 return $this->success( $response );
@@ -82,9 +77,9 @@
82 77 ];
83 78
84 79 $response = $this->http()->query( 'isVerifiedUser', '', $funcArgs )->post();
85 80
86 - if ( $response && !is_wp_error( $response ) ) {
81 + if ( $response ) {
87 82 $user = $this->utils( 'options' )->get( 'user' );
88 83
89 84 $user['is_verified'] = true;
90 85 $this->utils( 'options' )->set( 'user', $user );
@@ -103,9 +98,9 @@
103 98 "page" => $page
104 99 ] )->post();
105 100
106 101 if ( is_wp_error( $response ) ) {
107 - 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() );
108 103 }
109 104
110 105 if ( isset( $response['total'] ) ) {
111 106 $this->utils( 'options' )->set( 'total_download_counts', $response['total'] );
@@ -134,9 +129,9 @@
134 129
135 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();
136 131
137 132 if ( is_wp_error( $response ) ) {
138 - 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() );
139 134 }
140 135
141 136 return $response;
142 137 }
@@ -144,13 +139,11 @@
144 139 public function get_my_purchased_items() {
145 140 $page = $this->get_param( 'page', 1, 'intval' );
146 141 $per_page = $this->get_param( 'per_page', 10, 'intval' );
147 142 $_all = $this->get_param( 'all', false );
148 - $platform = $this->get_param( 'platform', 'elementor' );
149 143
150 144 $funcArgs = [
151 145 'api_key' => $this->api_key,
152 - 'platform' => $platform,
153 146 'page' => $page,
154 147 'per_page' => $per_page
155 148 ];
156 149