Automattic\WooCommerce\Blocks

BlockTemplatesController::update_product_archive_title()publicWC 1.0

Update the product archive title to "Shop".

Method of the class: BlockTemplatesController{}

No Hooks.

Return

String.

Usage

$BlockTemplatesController = new BlockTemplatesController();
$BlockTemplatesController->update_product_archive_title( $post_type_name, $post_type );
$post_type_name(string) (required)
Post type 'name' label.
$post_type(string) (required)
Post type.

BlockTemplatesController::update_product_archive_title() code WC 8.7.0

public function update_product_archive_title( $post_type_name, $post_type ) {
	if (
		function_exists( 'is_shop' ) &&
		is_shop() &&
		'product' === $post_type
	) {
		return __( 'Shop', 'woocommerce' );
	}

	return $post_type_name;
}