WC_Blocks_Utils::get_blocks_from_page( string $block_name, string $woo_page_name )

Get all instances of the specified block on a specific woo page (e.g. cart or checkout page).


Description Description


Parameters Parameters

$block_name

(Required) The name (id) of a block, e.g. woocommerce/cart.

$woo_page_name

(Required) The woo page to search, e.g. cart.


Top ↑

Return Return

(array) Array of blocks as returned by parse_blocks().


Top ↑

Source Source

File: includes/blocks/class-wc-blocks-utils.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.