| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 2 | Features | 2 |
| 1 | <?php |
||
| 61 | public function execute(FormInterface $form) |
||
| 62 | { |
||
| 63 | if (class_exists('\Timber\Timber')) { |
||
| 64 | $message = \Timber\Timber::compile($this->template, ['request' => $form->getData()]); |
||
| 65 | } elseif (class_exists('\Timber')) { |
||
| 66 | $message = \Timber::compile($this->template, ['request' => $form->getData()]); |
||
| 67 | } else { |
||
| 68 | throw new \InvalidArgumentException('Timber is required to use MailerAction'); |
||
| 69 | } |
||
| 70 | |||
| 71 | wp_mail($this->to, $this->subject, $message, [ |
||
| 72 | 'Content-Type: text/html; charset=UTF-8', |
||
| 73 | ]); |
||
| 74 | } |
||
| 75 | } |
||
| 76 |