2014-07-28 14:50:11 +00:00
< ? php
/**
* Admin View : Page - Status Tools
*/
2014-07-28 15:16:35 +00:00
if ( ! defined ( 'ABSPATH' ) ) {
exit ; // Exit if accessed directly
}
2014-07-28 14:50:11 +00:00
?>
2013-10-23 15:52:58 +00:00
< form method = " post " action = " options.php " >
< ? php settings_fields ( 'woocommerce_status_settings_fields' ); ?>
2014-05-01 13:40:28 +00:00
< ? php $options = wp_parse_args ( get_option ( 'woocommerce_status_options' , array () ), array ( 'uninstall_data' => 0 , 'template_debug_mode' => 0 , 'shipping_debug_mode' => 0 ) ); ?>
2013-10-23 15:52:58 +00:00
< table class = " wc_status_table widefat " cellspacing = " 0 " >
< thead class = " tools " >
< tr >
< th colspan = " 2 " >< ? php _e ( 'Tools' , 'woocommerce' ); ?> </th>
</ tr >
</ thead >
< tbody class = " tools " >
2014-06-04 17:25:49 +00:00
< ? php foreach ( $tools as $action => $tool ) : ?>
2013-10-23 16:21:03 +00:00
< tr >
< td >< ? php echo esc_html ( $tool [ 'name' ] ); ?> </td>
< td >
< p >
2013-11-11 18:20:03 +00:00
< a href = " <?php echo wp_nonce_url( admin_url('admin.php?page=wc-status&tab=tools&action=' . $action ), 'debug_action' ); ?> " class = " button " >< ? php echo esc_html ( $tool [ 'button' ] ); ?> </a>
2013-10-23 16:21:03 +00:00
< span class = " description " >< ? php echo wp_kses_post ( $tool [ 'desc' ] ); ?> </span>
</ p >
</ td >
</ tr >
2014-06-04 17:25:49 +00:00
< ? php endforeach ; ?>
2014-05-01 13:40:28 +00:00
< tr >
< td >< ? php _e ( 'Shipping Debug Mode' , 'woocommerce' ); ?> </td>
2014-11-30 06:52:32 +00:00
< td >
< p >
2014-05-01 13:40:28 +00:00
< label >< input type = " checkbox " class = " checkbox " name = " woocommerce_status_options[shipping_debug_mode] " value = " 1 " < ? php checked ( '1' , $options [ 'shipping_debug_mode' ] ); ?> /> <?php _e( 'Enabled', 'woocommerce' ); ?></label>
</ p >
< p >
< span class = " description " >< ? php _e ( 'This tool will disable shipping rate caching.' , 'woocommerce' ); ?> </span>
2014-11-30 06:52:32 +00:00
</ p >
</ td >
</ tr >
< tr >
2013-10-23 16:21:03 +00:00
< td >< ? php _e ( 'Template Debug Mode' , 'woocommerce' ); ?> </td>
2014-11-30 06:52:32 +00:00
< td >
< p >
2013-10-23 16:21:03 +00:00
< label >< input type = " checkbox " class = " checkbox " name = " woocommerce_status_options[template_debug_mode] " value = " 1 " < ? php checked ( '1' , $options [ 'template_debug_mode' ] ); ?> /> <?php _e( 'Enabled', 'woocommerce' ); ?></label>
</ p >
2013-10-23 15:52:58 +00:00
< p >
2013-10-23 16:21:03 +00:00
< span class = " description " >< ? php _e ( 'This tool will disable template overrides for logged-in administrators for debugging purposes.' , 'woocommerce' ); ?> </span>
2014-11-30 06:52:32 +00:00
</ p >
</ td >
</ tr >
< tr >
2015-02-12 11:09:13 +00:00
< td >< ? php _e ( 'Uninstall on Delete' , 'woocommerce' ); ?> </td>
2014-11-30 06:52:32 +00:00
< td >
< p >
2013-10-23 16:21:03 +00:00
< label >< input type = " checkbox " class = " checkbox " name = " woocommerce_status_options[uninstall_data] " value = " 1 " < ? php checked ( '1' , $options [ 'uninstall_data' ] ); ?> /> <?php _e( 'Enabled', 'woocommerce' ); ?></label>
2013-10-23 15:52:58 +00:00
</ p >
2013-10-23 16:21:03 +00:00
< p >
2015-02-12 11:09:13 +00:00
< span class = " description " >< ? php _e ( 'This tool will delete all WooCommerce, Product and Order data when uninstalling via Plugins > Delete.' , 'woocommerce' ); ?> </span>
2014-11-30 06:52:32 +00:00
</ p >
</ td >
</ tr >
2013-10-23 15:52:58 +00:00
</ tbody >
</ table >
2014-11-30 06:52:32 +00:00
< p class = " submit " >
< input type = " submit " class = " button-primary " value = " <?php esc_attr_e( 'Save Changes', 'woocommerce' ) ?> " />
</ p >
2014-06-04 17:25:49 +00:00
</ form >