WooCommerce Code Reference

Initializer
in package

Initializes the WooCommerce blocks renderers.

Table of Contents

ALLOWED_BLOCK_TYPES  = array('woocommerce/product-collection', 'woocommerce/product-image', 'woocommerce/product-price', 'woocommerce/product-button', 'woocommerce/product-sale-badge')
List of supported WooCommerce blocks in the email editor.
$renderers  : array<string|int, mixed>
Cache renderers by block name.
render_block()  : string
Returns the block content rendered by the block renderer.
update_block_settings()  : array<string|int, mixed>
Set `supports.email = true` and configure render_email_callback for supported blocks.
get_block_renderer()  : Abstract_Block_Renderer
Return an instance of Abstract_Block_Renderer by the block name.

Constants

Properties

Methods

update_block_settings()

Set `supports.email = true` and configure render_email_callback for supported blocks.

public update_block_settings(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
$settings : array<string|int, mixed>

Block settings.

Return values
array<string|int, mixed>