Skip to content
Docs
Get RestroPress

Filter

rpress_tools_diagnostics_summary

Updated
On this page

Filters the rows of the Restaurant Support Summary on the Diagnostics tab.

Runs when the Diagnostics tab builds its support summary table. Each row is an array with the keys label, value and note, shown under the Area, Current Value and Why it matters columns. Default rows cover the plugin version, WordPress and PHP versions, timezone, service mode, ordering window, required pages, payment gateways, REST API base, debug logging and upload directory.

Parameters#

ParameterTypeDescription
$summaryarrayList of rows, each an array with label, value and note keys.

Return value#

array. The list of summary rows.

Example#

function my_diagnostics_summary( $summary ) {
	$summary[] = array(
		'label' => __( 'My Integration', 'my-plugin' ),
		'value' => get_option( 'my_api_key' ) ? __( 'Connected', 'my-plugin' ) : __( 'Not connected', 'my-plugin' ),
		'note'  => __( 'Shows whether the integration can reach its service.', 'my-plugin' ),
	);
	return $summary;
}
add_filter( 'rpress_tools_diagnostics_summary', 'my_diagnostics_summary' );

Source#

Applied in:

  • includes/admin/tools.php (line 1521), in rpress_tools_get_diagnostics_summary()

See also#

Was this page helpful?