diff --git a/src/php/WPDiscuz/Base.php b/src/php/WPDiscuz/Base.php index 43b5f647..992d5fc3 100644 --- a/src/php/WPDiscuz/Base.php +++ b/src/php/WPDiscuz/Base.php @@ -26,6 +26,10 @@ public function __construct() { * @noinspection PhpUndefinedFunctionInspection */ protected function init_hooks(): void { + if ( ! function_exists( 'wpDiscuz' ) ) { + return; + } + $wpd_recaptcha = wpDiscuz()->options->recaptcha; $wpd_recaptcha = array_merge( $wpd_recaptcha,