Table Of Contents
Description
This filter can be used to change default labels in the grouped table and merge tags.
Parameters
$default_labels | Array
Return
Array
Usage
<?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";
// always include this
return $default_labels;
});
