Automattic\WooCommerce\Internal\EmailEditor
Integration::replace_editor
Replace the default editor with our custom email editor.
Method of the class: Integration{}
No Hooks.
Returns
true|false. Whether the editor was replaced.
Usage
$Integration = new Integration(); $Integration->replace_editor( $replace, $post );
- $replace(true|false) (required)
- Whether to replace the editor.
- $post(WP_Post) (required)
- Post object.
Integration::replace_editor() Integration::replace editor code WC 10.5.0
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;
}