Skip to content

Commit c755973

Browse files
authored
Merge pull request #40 from Biont/patch-1
Only require autoload.php if the package isn't already autoloaded
2 parents a1c5a91 + de4c162 commit c755973

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wc-smooth-generator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
defined( 'ABSPATH' ) || exit;
1414

1515
// autoloader.
16-
require __DIR__ . '/vendor/autoload.php';
16+
if( ! class_exists( \WC\SmoothGenerator\Plugin::class ) ){
17+
require __DIR__ . '/vendor/autoload.php';
18+
}
1719

1820
/**
1921
* Fetch instance of plugin.

0 commit comments

Comments
 (0)