Skip to content

Commit

Permalink
Bail out early if WPGraphQL is not activated.
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
esamattis committed Jan 27, 2020
1 parent 3311174 commit 7a49140
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ class Loader
private $pll_context_called = false;

static function init() {
// Bail out early if WPGraphQL is not activated.
if (!class_exists('WPGraphQL')) {
return;
};

define('WPGRAPHQL_POLYLANG', true);
(new Loader())->bind_hooks();
}
Expand Down

0 comments on commit 7a49140

Please sign in to comment.