Automattic\WooCommerce\Blocks
BlockTemplatesController::update_product_archive_title()
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() BlockTemplatesController::update product archive title code WC 7.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; }