Skip to content

Commit 4df9d0e

Browse files
committed
merge
2 parents a0abe83 + b88cb5e commit 4df9d0e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/cloudinary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Cloudinary
44
* Plugin URI: https://cloudinary.com/documentation/wordpress_integration
55
* Description: With the Cloudinary plugin, you can upload and manage your media assets in the cloud, then deliver them to your users through a fast content delivery network, improving your website’s loading speed and overall user experience. Apply multiple transformations and take advantage of a full digital asset management solution without leaving WordPress.
6-
* Version: 2.2.0-rc2
6+
* Version: 2.2.0-rc3
77
* Author: Cloudinary Ltd., XWP
88
* Author URI: https://cloudinary.com/
99
* License: GPLv2+

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-connect.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,16 @@ function ( $a ) {
305305
}
306306

307307
$this->config_from_url( $url );
308-
$test_result = check_status();
308+
$test_result = $this->check_status();
309309

310310
if ( is_wp_error( $test_result ) ) {
311-
$result['type'] = 'connection_error';
311+
$error = $test_result->get_error_message();
312+
if ( 'disabled account' !== strtolower( $error ) ) {
313+
// Account Disabled, is still successful, so allow it, else we will never be able to change it.
314+
$result['type'] = 'connection_error';
315+
}
312316
$result['message'] = ucwords( str_replace( '_', ' ', $test_result->get_error_message() ) );
313317
} else {
314-
$this->api = $test;
315318
$this->usage_stats( true );
316319
}
317320

@@ -336,7 +339,8 @@ public function check_status() {
336339
* @return array|\WP_Error
337340
*/
338341
public function test_ping() {
339-
$test = new Connect\Api( $this, $this->plugin->version );
342+
$test = new Connect\Api( $this, $this->plugin->version );
343+
$this->api = $test;
340344

341345
return $test->ping();
342346
}

0 commit comments

Comments
 (0)