Skip to content
Docs
Get RestroPress

Filter

rpress_payments_table_column

Updated
On this page

Filters the HTML for a cell in the Orders list table.

Applied to the value produced for a column. The default column renderer applies it to every column it renders, including custom columns without their own method, which makes it the place to output content for columns added with rpress_payments_table_columns.

Parameters#

ParameterTypeDescription
$valuestringThe cell content (HTML).
$payment_idintThe order ID for the row.
$column_namestringThe column key.

Return value#

string. The cell content.

Example#

function my_orders_column_value( $value, $payment_id, $column_name ) {
	if ( 'my_source' === $column_name ) {
		$value = esc_html( get_post_meta( $payment_id, 'my_source', true ) );
	}
	return $value;
}
add_filter( 'rpress_payments_table_column', 'my_orders_column_value', 10, 3 );

Notes#

Also applied by the email and customer column methods, with column names email and user. Those columns are not in the default column set.

Source#

Applied in:

  • includes/admin/payments/class-payments-table.php (line 1581), in RPRESS_Payment_History_Table::column_default()
  • includes/admin/payments/class-payments-table.php (line 1607), in RPRESS_Payment_History_Table::column_email()
  • includes/admin/payments/class-payments-table.php (line 2271), in RPRESS_Payment_History_Table::column_customer()

See also#

Was this page helpful?