| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace YayMail\TemplatePatterns; |
| 4 | 4 | |
| 5 | 5 | use YayMail\TemplatePatterns\PatternService; |
| 6 | +use YayMail\Utils\Helpers; | |
| 6 | 7 | use YayMail\Utils\SingletonTrait; |
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * @method static PatternLoaders get_instance() |
| @@ -19,9 +20,9 @@ | ||
| 19 | 20 | private function __construct() { |
| 20 | 21 | |
| 21 | 22 | $this->service = PatternService::get_instance(); |
| 22 | 23 | |
| 23 | - $dir = new \DirectoryIterator( YAYMAIL_PLUGIN_PATH . '/src/TemplatePatterns/Patterns' ); | |
| 24 | + $dir = new \DirectoryIterator( Helpers::get_plugin_path() . '/src/TemplatePatterns/Patterns' ); | |
| 24 | 25 | foreach ( $dir as $fileinfo ) { |
| 25 | 26 | if ( ! $fileinfo->isDot() ) { |
| 26 | 27 | $file_name = $fileinfo->getFilename(); |
| 27 | 28 | $class_name = basename( $file_name, '.php' ); |