Change any post Type Name (Posts, Pages, Products) to any other name like Tools etc (In this case products changed to tools)

WooCommerce PHP July 23, 2026
add_action('init', 'rename_woocommerce_labels');
function rename_woocommerce_labels() {
    global $wp_post_types;
    $labels = &$wp_post_types['product']->labels;
    $labels->name = 'Tools';
    $labels->singular_name = 'Tool';
    $labels->add_new = 'Add Tool';
    $labels->add_new_item = 'Add Tool';
    $labels->edit_item = 'Edit Tool';
    $labels->new_item = 'Tool';
    $labels->view_item = 'View Tool';
    $labels->search_items = 'Search Tools';
    $labels->not_found = 'No Tools found';
    $labels->not_found_in_trash = 'No Tools found in Trash';
    $labels->all_items = 'All Tools';
    $labels->menu_name = 'Tools';
    $labels->name_admin_bar = 'Tools';
}