diff --git a/.gitattributes b/.gitattributes index 3bee9f50..65a9bfa5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,8 +9,6 @@ phpunit.xml.dist export-ignore wp-tests-config-sample.php export-ignore phpcs.xml.dist export-ignore -composer.json export-ignore -composer.lock export-ignore package.json export-ignore package-lock.json export-ignore .wp-env.json export-ignore diff --git a/plugin.php b/plugin.php index 8f5803b6..78acc1aa 100644 --- a/plugin.php +++ b/plugin.php @@ -25,7 +25,11 @@ const PLUGIN_DIR = __DIR__; const PLUGIN_FILE = __FILE__; -require_once __DIR__ . '/vendor/autoload.php'; +// Use local autoload if available. +if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { + require_once __DIR__ . '/vendor/autoload.php'; +} + require_once __DIR__ . '/inc/namespace.php'; require_once __DIR__ . '/inc/avatars/namespace.php'; require_once __DIR__ . '/inc/credits/namespace.php';