Updated 14 September 2026
On this page
Description
This filter can be used to change the default labels in the grouped products table, the merge tags, the grouped pages and the mobile bar. Handy to translate them without a translation plugin.
Parameters
$default_labels | Array. All the labels, see the example for every key
Return
Array
Usage
Copy the below code to the functions.php of your child theme or to your snippet plugin.
<?php
/**
* Example to change default labels
* Instructions:
* 1. Copy the below code to your functions.php or code snippet plugin
* 2. Change default values to your liking
* 3. Optional: remove lines you dont need but always include the last line.
*/
add_filter( "gotrls_default_labels", function( $default_labels ) {
// grouped products table and mergetags
$default_labels["product_column_head"] = "Product";
$default_labels["qty_column_head"] = "Qty";
$default_labels["price_column_head"] = "Price";
$default_labels["unit_column_head"] = "Unit";
// mergetags only
$default_labels["order_section_title"] = "Order";
$default_labels["subtotal_label"] = "Sub Total";
$default_labels["total_label"] = "Total";
// price breakdown: the first line under a product
$default_labels["product_base_price"] = "Base price";
// grouped pages: the title of a page without a name, %d becomes the page number
$default_labels["collapsible_step"] = "Step";
// grouped pages: the name of the edit link for screen readers, followed by the page title (since 2.2)
$default_labels["edit_page"] = "Edit";
// mobile bar (since 2.2). Keep the %d and %1$d/%2$d placeholders, they become the numbers
$default_labels["mobile_bar_view"] = "View summary";
$default_labels["mobile_bar_item"] = "%d item";
$default_labels["mobile_bar_items"] = "%d items";
$default_labels["mobile_bar_answered"] = "%1$d of %2$d answered";
// always include this
return $default_labels;
} );
Since
version 2.0.0
Didn’t find what you were looking for?
Or contact support and I will help you out.
