Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ public function getLocaleOptions()
return Mage::app()->getLocale()->getOptionLocales();
}

public function getTemplateOptions()
public function getTemplateOptions(): array
{
return Mage_Core_Model_Email_Template::getDefaultTemplatesAsOptionsArray();
return Mage::getModel('core/email_template')->getDefaultTemplatesAsOptionsArray();
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating a new model instance on every call to getTemplateOptions() is inefficient. Consider instantiating the model once and reusing it, or caching the result if the templates don't change frequently during a request.

Copilot uses AI. Check for mistakes.
}

public function getCurrentLocale()
Expand Down
Loading