Automattic\WooCommerce\EmailEditor\Engine

Email_Editor::register_email_post_typesprivateWC 1.0

Register all custom post types that should be edited via the email editor The post types are added via woocommerce_email_editor_post_types filter.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->register_email_post_types(): void;

Код Email_Editor::register_email_post_types() WC 10.4.3

private function register_email_post_types(): void {
	foreach ( $this->get_post_types() as $post_type ) {
		register_post_type(
			$post_type['name'],
			array_merge( $this->get_default_email_post_args(), $post_type['args'] )
		);
	}
}