corsonr
6/22/2015 - 10:26 AM

WooCommerce: create a custom section in system status

WooCommerce: create a custom section in system status

<?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;
}