Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Fix proceed to checkout button on Cart #6804

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/BlockTypes/ProceedToCheckoutBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,16 @@ class ProceedToCheckoutBlock extends AbstractInnerBlock {
* @var string
*/
protected $block_name = 'proceed-to-checkout-block';


/**
* Extra data passed through from server to client for block.
*
* @param array $attributes Any attributes that currently are available from the block.
* Note, this will be empty in the editor context when the block is
* not in the post content on editor load.
*/
protected function enqueue_data( array $attributes = [] ) {
$this->asset_data_registry->register_page_id( isset( $attributes['checkoutPageId'] ) ? $attributes['checkoutPageId'] : 0 );
}
}