SingleProductExpressPaymentBlock implements IntegrationInterface

Bridges the woocommerce/add-to-cart-with-options interactivity API block with the Stripe express payment button infrastructure.

The block's variation selector updates variationId in the woocommerce/products context rather than firing jQuery found_variation events, so a small iAPI view script watches the context and dispatches CustomEvents that the existing product controller can subscribe to via DOMEvents.js actions.

Tags
since
4.0.0

Table of Contents

Interfaces

IntegrationInterface

Properties

$assets  : mixed
$payment_registry  : mixed

Methods

__construct()  : mixed
append_interactivity_container()  : mixed
Injects a hidden interactivity container inside the block's outer wrapper.
get_editor_script_handles()  : mixed
get_name()  : mixed
get_script_data()  : mixed
get_script_handles()  : mixed
initialize()  : mixed

Properties

Methods

append_interactivity_container()

Injects a hidden interactivity container inside the block's outer wrapper.

public append_interactivity_container(mixed $block_content) : mixed

The element must be a descendant of the woocommerce/products context element (set by woocommerce/add-to-cart-with-options) so that getContext('woocommerce/products') inside the view script resolves to the per-product {productId, variationId} object.

Parameters
$block_content : mixed

        
On this page

Search results