- fixed locate template in default plugin folder;

This commit is contained in:
nikitasinelnikov
2019-03-29 17:43:51 +02:00
parent efaf097a43
commit 7ce4af03b7
2 changed files with 7 additions and 3 deletions
@@ -40,6 +40,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
add_filter( 'um_builtin_validation_types_continue_loop', array( &$this, 'validation_types_continue_loop' ), 1, 4 );
add_filter( 'um_restrict_content_hide_metabox', array( &$this, 'hide_metabox_restrict_content_shop' ), 10, 1 );
/**
* @todo remove these options
*/
add_filter( 'um_admin_access_settings_fields', array( &$this, 'wpml_post_options' ), 10, 2 );
}
@@ -371,8 +371,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
$language_codes = $this->get_languages_codes();
$lang = '';
if ( $language_codes['default'] != $language_codes['current'] /*&&
UM()->config()->email_notifications[ $template_name ]['recipient'] != 'admin'*/ ) {
if ( $language_codes['default'] != $language_codes['current'] ) {
$lang = $language_codes['current'] . '/';
}
@@ -385,7 +384,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
//if there isn't template at theme folder get template file from plugin dir
if ( ! $template ) {
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : um_path . 'templates/email';
$template = trailingslashit( $path ) . $lang . $template_name . '.php';
$template = trailingslashit( $path ) . $template_name . '.php';
}
return $template;