Create Custom WooCommerce System Status Sections

When you create a plugin, I can be very useful to add a custom section to the System Status default page. When debugging a customer site you always need to check various details, and these details are pretty much always the same.

That’s why adding such a debugging section is important. And the good news is that it’s very easy to do. Here a sample of code that will add a new section to the System Status page in WooCommerce. Simply paste the code provided below, paste it in your plugin source code (or in functions.php in the theme folder for testing purpose) and customize it!

Here is a screenshot of the final result:

woocommerce-debug-section

And here is the code:

<?php

add_action( 'woocommerce_system_status_report', 'render_debug_section' );

/**
 * Renders the debug section
 */
function render_debug_section() {
?>
	<table class="wc_status_table widefat" cellspacing="0" id="status">
		<thead>
			<tr>
				<th colspan="3" data-export-label="My Own Section"><?php _e('My Own Section', 'woocommerce'); ?> <a href="#" class="help_tip" data-tip="<?php _e(' This is where you explain why you add this section!', 'woocommerce' ); ?>">[?]</a></th>
			</tr>
		</thead>

		<tbody>
			<tr>
				<td data-export-label="Line 1"><?php _e( 'Line 1', 'woocommerce' ); ?></td>
				<td class="help"><a href="#" class="help_tip" data-tip="<?php _e('Description line 1', 'woocommerce'); ?>">[?]</a></td>
				<td><?php echo 'value line 1'; ?></td>
			</tr>
			<tr>
				<td data-export-label="Line 2"><?php _e( 'Line 2', 'woocommerce' ); ?></td>
				<td class="help"><a href="#" class="help_tip" data-tip="<?php _e('Description line 2', 'woocommerce'); ?>">[?]</a></td>
				<td><?php echo 'value line 2'; ?></td>
			</tr>
			<tr>
				<td data-export-label="Line 3"><?php _e( 'Line 3', 'woocommerce' ); ?></td>
				<td class="help"><a href="#" class="help_tip" data-tip="<?php _e('Description line 3', 'woocommerce'); ?>">[?]</a></td>
				<td><?php echo 'value line 3'; ?></td>
			</tr>
		</tbody>
	</table>
<?php
return true;
}