Skip to content
Docs
Get RestroPress

Filter

rpress_export_earnings_supported_statuses

Updated
On this page

Filters the order statuses included in the earnings report export.

Runs when the earnings report export builds its column list and totals. The default is every payment status key from rpress_get_payment_statuses() except pending, processing and preapproval. Each returned status gets its own pair of count and amount columns.

Parameters#

ParameterTypeDescription
$supported_statusesarrayList of payment status keys.

Return value#

array. List of payment status keys.

Example#

function my_earnings_report_statuses( $supported_statuses ) {
	return array_values( array_diff( $supported_statuses, array( 'abandoned' ) ) );
}
add_filter( 'rpress_export_earnings_supported_statuses', 'my_earnings_report_statuses', 10, 1 );

Source#

Applied in:

  • includes/admin/reporting/export/class-batch-export-earnings-report.php (line 92), in RPRESS_Batch_Earnings_Report_Export::get_supported_statuses()

See also#

Was this page helpful?