diff --git a/Lib/Appsero/Client.php b/Lib/Appsero/Client.php index 08b7f654d..1e5b40abe 100644 --- a/Lib/Appsero/Client.php +++ b/Lib/Appsero/Client.php @@ -2,6 +2,8 @@ namespace WeDevs\Wpuf\Lib\Appsero; +use WP_Error; + /** * Appsero Client * @@ -110,13 +112,9 @@ public function __construct( $hash, $name, $file ) { /** * Initialize insights class * - * @return Appsero\Insights + * @return object */ public function insights() { - if ( ! class_exists( __NAMESPACE__ . '\Insights' ) ) { - require_once __DIR__ . '/Insights.php'; - } - // if already instantiated, return the cached one if ( $this->insights ) { return $this->insights; @@ -130,13 +128,9 @@ public function insights() { /** * Initialize license checker * - * @return Appsero\License + * @return object */ public function license() { - if ( ! class_exists( __NAMESPACE__ . '\License' ) ) { - require_once __DIR__ . '/License.php'; - } - // if already instantiated, return the cached one if ( $this->license ) { return $this->license; diff --git a/Lib/WeDevs_Insights.php b/Lib/WeDevs_Insights.php index 702fc4bb8..4a732a00d 100644 --- a/Lib/WeDevs_Insights.php +++ b/Lib/WeDevs_Insights.php @@ -2,7 +2,7 @@ namespace WeDevs\Wpuf\Lib; -if ( ! class_exists( 'WPUF_WeDevs_Insights' ) ) : +if ( ! class_exists( 'WeDevs_Insights' ) ) : /** * weDevs Tracker @@ -17,7 +17,7 @@ */ class WeDevs_Insights { /** - * @var object|Appsero\Insights|Insights + * @var object|Appsero\Insights */ public $insights; @@ -25,18 +25,10 @@ class WeDevs_Insights { * Initialize the class */ public function __construct( $file ) { - if ( ! class_exists( 'Appsero\Client' ) ) { - require_once WPUF_ROOT . '/Lib/Appsero/Client.php'; - } - $client = new Appsero\Client( '958afc63-99f8-4b98-b321-fcbc5cf95694', 'WP User Frontend', $file ); $this->insights = $client->insights(); $this->insights->client = $client; $this->insights->init(); - -// $client = new Appsero\Client( '958afc63-99f8-4b98-b321-fcbc5cf95694', 'WP User Frontend', $file ); -// $this->insights = $client->insights(); -// $this->insights->init(); } } diff --git a/Lib/WeDevs_Settings_API.php b/Lib/WeDevs_Settings_API.php index a74843450..7a5cd9ad5 100644 --- a/Lib/WeDevs_Settings_API.php +++ b/Lib/WeDevs_Settings_API.php @@ -538,7 +538,7 @@ function get_option( $option, $section, $default = '' ) { function show_navigation() { $html = '