From 2b10e5434d1825fb2d32781abee26cf9c444c6b0 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Fri, 14 Jun 2019 10:49:28 +0300 Subject: [PATCH] Allow project-level autoload (#7) --- command.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command.php b/command.php index 7514b20..26106f9 100644 --- a/command.php +++ b/command.php @@ -11,6 +11,8 @@ return; } -require_once( __DIR__ . '/vendor/autoload.php' ); +if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { + require_once __DIR__ . '/vendor/autoload.php'; +} WP_CLI::add_command( 'replicator', ReplicatorCommand::class );