Simplify check for replacing editor

We always want to use the block email editor for mailpoet_email CPT.
We don't need to check if it is allowed for the CPT.
[MAILPOET-6090]
This commit is contained in:
Rostislav Wolny
2024-11-15 15:08:40 +01:00
committed by Oluwaseun Olorunsola
parent b124ffe596
commit 6f53c159eb

View File

@@ -80,8 +80,7 @@ class EmailEditor {
public function replaceEditor($replace, $post) {
$currentScreen = get_current_screen();
if (use_block_editor_for_post($post) && $post->post_type === self::MAILPOET_EMAIL_POST_TYPE && $currentScreen) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
if ($post->post_type === self::MAILPOET_EMAIL_POST_TYPE && $currentScreen) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->editorPageRenderer->render();
return true;
}