Refactor template registration to use Template_Registry

[MAILPOET-6453]
This commit is contained in:
Jan Lysý
2025-02-05 20:05:32 +01:00
committed by Jan Lysý
parent 9abf223005
commit 50e986715e
3 changed files with 43 additions and 29 deletions

View File

@@ -53,8 +53,9 @@ class Templates_Test extends \MailPoetTest {
$trigger_check = false;
add_action(
'mailpoet_email_editor_register_templates',
function () use ( &$trigger_check ) {
function ( $registry ) use ( &$trigger_check ) {
$trigger_check = true;
return $registry;
}
);
$this->templates->initialize( array( 'mailpoet_email' ) );