Skip to content

Commit 03b0b88

Browse files
committed
Allow loading twice
1 parent 567808d commit 03b0b88

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)