Filter
rpress_report_column_{$column_name}
On this page
Filters the output of a column in the customers report table.
Runs for every cell rendered by the default column handler of the customers report table. The dynamic part is the column name, such as num_purchases, amount_spent or fooditems. The value is the HTML or text about to be printed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | string|null | The cell content for this column. |
$customer_id | int | ID of the customer in the row (the row's id value). |
Return value#
string|null. The cell content to print.
Example#
function my_amount_spent_column( $value, $customer_id ) {
return $value . ' <small>#' . absint( $customer_id ) . '</small>';
}
add_filter( 'rpress_report_column_amount_spent', 'my_amount_spent_column', 10, 2 );
Source#
Applied in:
includes/admin/reporting/class-customer-reports-table.php(line 115), inRPRESS_Customer_Reports_Table::column_default()
See also#
Was this page helpful?
