Skip to content

Commit 25941a7

Browse files
authored
Merge pull request #49 from WP-API/allow-loading-twice
Allow loading twice
2 parents 567808d + 03b0b88 commit 25941a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugin.php

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
namespace WP\OAuth2;
1212

13+
// Avoid loading twice if loaded via App Connect.
14+
if ( class_exists( 'WP\\OAuth2\\Client' ) ) {
15+
return;
16+
}
17+
1318
require __DIR__ . '/inc/namespace.php';
1419
require __DIR__ . '/inc/class-client.php';
1520
require __DIR__ . '/inc/class-scopes.php';

0 commit comments

Comments
 (0)