| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace YayMail\TemplateLibrary; |
| 4 | 4 | |
| 5 | 5 | use YayMail\Abstracts\BaseTemplate; |
| 6 | +use YayMail\Utils\Helpers; | |
| 6 | 7 | use YayMail\Utils\SingletonTrait; |
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * Loader that auto-discovers and registers Template Library templates |
| @@ -25,9 +26,9 @@ | ||
| 25 | 26 | * @return void |
| 26 | 27 | */ |
| 27 | 28 | protected function load_templates_from_directory() { |
| 28 | 29 | $template_library_service = TemplateLibraryService::get_instance(); |
| 29 | - $templates_base_path = YAYMAIL_PLUGIN_PATH . '/src/TemplateLibrary/Templates'; | |
| 30 | + $templates_base_path = Helpers::get_plugin_path() . '/src/TemplateLibrary/Templates'; | |
| 30 | 31 | $templates_base_namespace = 'YayMail\\TemplateLibrary\\Templates'; |
| 31 | 32 | |
| 32 | 33 | if ( ! is_dir( $templates_base_path ) ) { |
| 33 | 34 | return; |