SingleProductExpressPaymentBlock
in package
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
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
$assets
private
mixed
$assets
$payment_registry
private
mixed
$payment_registry
Methods
__construct()
public
__construct(AssetsApi $assets, PaymentGatewayRegistry $payment_registry) : mixed
Parameters
- $assets : AssetsApi
- $payment_registry : PaymentGatewayRegistry
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
get_editor_script_handles()
public
get_editor_script_handles() : mixed
get_name()
public
get_name() : mixed
get_script_data()
public
get_script_data() : mixed
get_script_handles()
public
get_script_handles() : mixed
initialize()
public
initialize() : mixed