Automattic\WooCommerce\Internal\EmailEditor

Integration::replace_editor()publicWC 1.0

Replace the default editor with our custom email editor.

Метод класса: Integration{}

Хуков нет.

Возвращает

true|false. Whether the editor was replaced.

Использование

$Integration = new Integration();
$Integration->replace_editor( $replace, $post );
$replace(true|false) (обязательный)
Whether to replace the editor.
$post(WP_Post) (обязательный)
Post object.

Код Integration::replace_editor() WC 9.8.2

public function replace_editor( $replace, $post ) {
	$current_screen = get_current_screen();
	if ( self::EMAIL_POST_TYPE === $post->post_type && $current_screen ) {
		$this->editor_page_renderer->render();
		return true;
	}
	return $replace;
}