Automattic\WooCommerce\Blocks\Patterns
PatternRegistry::get_category_labels
Returns pattern slugs with their localized labels for categorization.
Each key represents a unique pattern slug, while the value is the localized label.
Method of the class: PatternRegistry{}
No Hooks.
Returns
Array
Usage
// private - for code of main (parent) class only $result = $this->get_category_labels();
PatternRegistry::get_category_labels() PatternRegistry::get category labels code WC 10.6.2
private function get_category_labels() {
return [
'woo-commerce' => __( 'WooCommerce', 'woocommerce' ),
'intro' => __( 'Intro', 'woocommerce' ),
'featured-selling' => __( 'Featured Selling', 'woocommerce' ),
'about' => __( 'About', 'woocommerce' ),
'social-media' => __( 'Social Media', 'woocommerce' ),
'services' => __( 'Services', 'woocommerce' ),
'reviews' => __( 'Reviews', 'woocommerce' ),
];
}