MiniCartTemplate::register_mini_cart_template_part_area()publicWC 1.0

Add Mini-Cart to the default template part areas.

Method of the class: MiniCartTemplate{}

No Hooks.


Array. The supported template part areas including the Mini-Cart one.


$MiniCartTemplate = new MiniCartTemplate();
$MiniCartTemplate->register_mini_cart_template_part_area( $default_area_definitions );
$default_area_definitions(array) (required)
An array of supported area objects.

MiniCartTemplate::register_mini_cart_template_part_area() code WC 8.9.0

public function register_mini_cart_template_part_area( $default_area_definitions ) {
	$mini_cart_template_part_area = array(
		'area'        => 'mini-cart',
		'label'       => __( 'Mini-Cart', 'woocommerce' ),
		'description' => __( 'The Mini-Cart template allows shoppers to see their cart items and provides access to the Cart and Checkout pages.', 'woocommerce' ),
		'icon'        => 'mini-cart',
		'area_tag'    => 'mini-cart',
	return array_merge( $default_area_definitions, array( $mini_cart_template_part_area ) );