• File: ProceedToCheckoutBlock.php
  • Full Path: /home/builxejc/public_html/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/ProceedToCheckoutBlock.php
  • Date Modified: 12/27/2023 12:45 AM
  • File size: 783 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
namespace Automattic\WooCommerce\Blocks\BlockTypes;

/**
 * ProceedToCheckoutBlock class.
 */
class ProceedToCheckoutBlock extends AbstractInnerBlock {
	/**
	 * Block name.
	 *
	 * @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 );
	}
}