Automattic\WooCommerce\Blocks\Domain
Bootstrap::handle_woocommerce_email_editor_render_start
Register WooCommerce block types on demand before an email is rendered by the email editor package.
Emails are often sent from requests where eager block registration is skipped (cron, AJAX, Store API), and unregistered WooCommerce blocks, such as Product Collection, would render empty in the email.
Метод класса: Bootstrap{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Bootstrap = new Bootstrap(); $Bootstrap->handle_woocommerce_email_editor_render_start(): void;
Код Bootstrap::handle_woocommerce_email_editor_render_start() Bootstrap::handle woocommerce email editor render start WC 11.2.2
public function handle_woocommerce_email_editor_render_start(): void {
$this->container->get( BlockTypesController::class )->register_blocks_for_email();
}