← All changes
|
modules/cloud-library/connect/cloud-library.php
+0
-6
4.2.0
→
3.29.0-dev4
View file →
| @@ -137,9 +137,8 @@ | ||
| 137 | 137 | 'headers' => [ |
| 138 | 138 | 'Content-Type' => 'application/json', |
| 139 | 139 | ], |
| 140 | 140 | 'body' => wp_json_encode( $data ), |
| 141 | - 'timeout' => 120, | |
| 142 | 141 | ]; |
| 143 | 142 | |
| 144 | 143 | return $this->http_request( 'POST', 'resources/bulk', $resource, [ |
| 145 | 144 | 'return_type' => static::HTTP_RETURN_TYPE_ARRAY, |
| @@ -191,9 +190,8 @@ | ||
| 191 | 190 | ]; |
| 192 | 191 | |
| 193 | 192 | $response = $this->http_request( 'PATCH', $endpoint, $payload, [ |
| 194 | 193 | 'return_type' => static::HTTP_RETURN_TYPE_ARRAY, |
| 195 | - 'timeout' => 120, | |
| 196 | 194 | ]); |
| 197 | 195 | |
| 198 | 196 | if ( is_wp_error( $response ) || empty( $response['preview_url'] ) ) { |
| 199 | 197 | $error_message = esc_html__( 'Failed to save preview.', 'elementor' ); |
| @@ -335,12 +333,8 @@ | ||
| 335 | 333 | /** |
| 336 | 334 | * @return array|\WP_Error |
| 337 | 335 | */ |
| 338 | 336 | public function get_quota() { |
| 339 | - if ( ! $this->is_connected() ) { | |
| 340 | - return new \WP_Error( 'not_connected', esc_html__( 'Not connected', 'elementor' ) ); | |
| 341 | - } | |
| 342 | - | |
| 343 | 337 | return $this->http_request( 'GET', 'quota', [], [ |
| 344 | 338 | 'return_type' => static::HTTP_RETURN_TYPE_ARRAY, |
| 345 | 339 | ] ); |
| 346 | 340 | } |