From a2e81eb70b49f23300034ecefab7b929309ca472 Mon Sep 17 00:00:00 2001 From: Ryan Hoover Date: Fri, 17 Jul 2020 11:17:28 -0500 Subject: [PATCH] Load dependencies only if not yet loaded --- includes/class-amazonpolly.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/class-amazonpolly.php b/includes/class-amazonpolly.php index 589aa30a..2b51f104 100644 --- a/includes/class-amazonpolly.php +++ b/includes/class-amazonpolly.php @@ -159,7 +159,9 @@ private function load_dependencies() /** * Load AWS PHP SDK */ - require_once plugin_dir_path(dirname(__FILE__)) . 'vendor/autoload.php'; + if ( ! class_exists( 'Aws\Sdk' ) ) { + require_once plugin_dir_path(dirname(__FILE__)) . 'vendor/autoload.php'; + } /** * The class responsible for custom helper functions