Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rename WooCommerce "Brands" to "Manufacturers"
<?php
/**
* Rename WooCommerce "Brands" to "Manufacturers"
*
* @param array $args
*
* @return array
*/
add_filter( 'register_taxonomy_product_brand', 'woocomerce_brands_filter', 10, 1 );
function woocomerce_brands_filter( $args ) {
// Change the labels
$args['label'] = __( 'Manufacturers', 'custom' );
$args['labels'] = array(
'name' => __( 'Manufacturers', 'custom' ),
'singular_name' => __( 'Manufacturer', 'custom' ),
'search_items' => __( 'Search Manufacturers', 'custom' ),
'all_items' => __( 'All Manufacturers', 'custom' ),
'parent_item' => __( 'Parent Manufacturer', 'custom' ),
'parent_item_colon' => __( 'Parent Manufacturer:', 'custom' ),
'edit_item' => __( 'Edit Manufacturer', 'custom' ),
'update_item' => __( 'Update Manufacturer', 'custom' ),
'add_new_item' => __( 'Add New Manufacturer', 'custom' ),
'new_item_name' => __( 'New Manufacturer Name', 'custom' )
);
return $args;
}
@gilmais
Copy link

gilmais commented Dec 18, 2017

please can you explain dummy level :-). i see the code but i dont know where to add It and what configuration to do after so i can see it in the site.

@chaz493
Copy link

chaz493 commented Jan 10, 2019

For those who don't already know, add this code to your themes functions.php file for implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment