diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index d87a875..e022775 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -630,7 +630,7 @@ protected function extract_strings() { $translation->addExtractedComment( sprintf( '%s of the plugin', $header ) ); } - if ( $this->main_file_path ) { + if ( $this->main_file_path && $this->location ) { $translation->addReference( str_replace( "$this->source/", '', $this->main_file_path ) );