diff --git a/admin/woocommerce-admin-debug.php b/admin/woocommerce-admin-debug.php index e0dea153c28..1776628cb02 100644 --- a/admin/woocommerce-admin-debug.php +++ b/admin/woocommerce-admin-debug.php @@ -9,6 +9,7 @@ function woocommerce_debug() { global $woocommerce; + $tools = apply_filters( 'wc_debug_tools', array( 'clear_transients' => array( 'name' => __('Transients','woocommerce'), @@ -21,8 +22,7 @@ function woocommerce_debug() { 'desc' => __( 'This tool will reset the admin, customer and shop_manager roles to default. Use this if your users cannot access all of the WooCommerce admin pages.', 'woocommerce' ), ), ) ); - $classes = array('alternate',''); - $class = 0; + ?>

@@ -30,6 +30,7 @@ function woocommerce_debug() { clear_product_transients(); @@ -51,8 +52,9 @@ function woocommerce_debug() { echo '

' . __('Roles successfully reset', 'woocommerce') . '

'; break; default: - if( isset( $tools[$_GET['action']]['callback'] ) ) { - $callback = $tools[$_GET['action']]['callback']; + $action = esc_attr( $_GET['action'] ); + if( isset( $tools[ $action ]['callback'] ) ) { + $callback = $tools[ $action ]['callback']; $return = call_user_func( $callback ); if( $return === false ) { if( is_array( $callback ) ) { @@ -77,7 +79,7 @@ function woocommerce_debug() { - + version; ?> @@ -85,7 +87,7 @@ function woocommerce_debug() { - + - + @@ -131,7 +133,7 @@ function woocommerce_debug() { - + @@ -188,7 +190,7 @@ function woocommerce_debug() { foreach ( $check_pages as $page_name => $values ) { - if ( $alt == 1 ) echo ''; else echo ''; + if ( $alt == 1 ) echo ''; else echo ''; echo '' . $page_name . ''; @@ -232,7 +234,7 @@ function woocommerce_debug() { - + - + - + - + ' . __('Yes', 'woocommerce') . ''; else echo '' . __('No', 'woocommerce') . ''; ?> @@ -292,7 +294,7 @@ function woocommerce_debug() { - + - + @@ -367,7 +369,7 @@ function woocommerce_debug() { $tool) { ?> - +

diff --git a/readme.txt b/readme.txt index 059448ae4f6..a3012f4b1ac 100644 --- a/readme.txt +++ b/readme.txt @@ -156,6 +156,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Individually sold variation handling * Tweak - Removed mdash; from shipping options * Tweak - Made woocommerce_locate_template more useful for third party plugins - ability to pass a full path +* Tweak - WC Debug page hooks * Fix - Google Analytics options fix * Fix - % discount rounding