Automattic\WooCommerce\Blocks\BlockTypes

CartOrderSummaryBlock::get_inner_block_content()privateWC 1.0

Get the contents of the given inner block.

Method of the class: CartOrderSummaryBlock{}

No Hooks.

Return

Array|true|false.

Usage

// private - for code of main (parent) class only
$result = $this->get_inner_block_content( $block_name, $content );
$block_name(string) (required)
Name of the order summary inner block.
$content(string) (required)
The content to search.

CartOrderSummaryBlock::get_inner_block_content() code WC 9.0.1

private function get_inner_block_content( $block_name, $content ) {
	if ( preg_match( $this->inner_block_regex( $block_name ), $content, $matches ) ) {
		return $matches[0];
	}
	return false;
}