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

Commit

Permalink
fix proceed to checkout button (#6804)
Browse files Browse the repository at this point in the history
  • Loading branch information
senadir authored Aug 1, 2022
1 parent 9d57054 commit 33dfd70
Showing 1 changed file with 12 additions and 0 deletions.
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 );
}
}

0 comments on commit 33dfd70

Please sign in to comment.