From 41f7fb17b089d18faaee6645f8946754caa45e84 Mon Sep 17 00:00:00 2001 From: Marco Pereirinha Date: Tue, 11 Aug 2020 18:25:29 +0100 Subject: [PATCH] Make sure that Cloudinary is connected before --- .../php/class-sync.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php index 20ec262e4..f9dc2b2f5 100644 --- a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php +++ b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php @@ -108,10 +108,12 @@ public function enqueue_assets() { * Register Assets. */ public function register_assets() { - // Setup the sync_base_structure. - $this->setup_sync_base_struct(); - // Setup sync types. - $this->setup_sync_types(); + if ( $this->plugin->config['connect'] ) { + // Setup the sync_base_structure. + $this->setup_sync_base_struct(); + // Setup sync types. + $this->setup_sync_types(); + } }