gotrls_default_grouped_columns

Description

Use this filter hide or show column in the grouped product table

Parameters

$grouped_columns | Array of possible columns. Options are: label , qty , unit_price , line_total

$form | Array

$field_id | string holds the field id of the summary field OR ‘side’ for the side summary

Return

Array $grouped_columns

Usage

<?php
/**
 * Example 1: Only display the label and the line total for live summary field with ID 50
 * 
**/
add_filter("gotrls_default_grouped_columns" , "grouped_columns", 10, 3);
function grouped_columns($columns , $form , $type_or_id) {
	if($type_or_id == '50') {
		return array('label' , 'line_total');
	}
	return $columns;
}

Since

version 2.0.7

Scroll to Top