Skip to content
Snippets Groups Projects
Commit e6c7ccc4 authored by Piotr Potrebka's avatar Piotr Potrebka
Browse files

feat: email abstract

parent 83f57709
No related branches found
No related tags found
1 merge request!2Devel
Pipeline #153093 passed with stages
in 56 seconds
......@@ -136,7 +136,7 @@ abstract class EmailAbstract implements EmailInterface {
throw new Exception( 'Empty email subject' );
}
return $this->subject;
return $this->replace_placeholders( $this->subject );
}
/**
......@@ -158,7 +158,7 @@ abstract class EmailAbstract implements EmailInterface {
* @return string
*/
public function get_heading(): string {
return $this->heading;
return $this->replace_placeholders( $this->heading );
}
/**
......@@ -285,7 +285,7 @@ abstract class EmailAbstract implements EmailInterface {
* @throws Exception
*/
public function get_content(): string {
return $this->content;
return $this->replace_placeholders( $this->content );
}
/**
......
......@@ -42,7 +42,7 @@ class Mailer {
foreach ( $dirs as $dir ) {
$resolver->appendResolver( new DirResolver( $dir ) );
}
$resolver->appendResolver( new DirResolver( __DIR__ ) );
$resolver->appendResolver( new DirResolver( __DIR__ . '/templates' ) );
return new SimplePhpRenderer( $resolver );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment