array(
'name' => __( 'Transients','woocommerce'),
'button' => __('Clear Transients','woocommerce'),
'desc' => __( 'This tool will clear the product/shop transients cache.', 'woocommerce' ),
),
'reset_roles' => array(
'name' => __('Capabilities','woocommerce'),
'button' => __('Reset Capabilities','woocommerce'),
'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' ),
),
) );
?>
clear_product_transients();
echo '
' . __( 'Product Transients Cleared', 'woocommerce' ) . '
';
break;
case "reset_roles" :
// Remove then re-add caps and roles
woocommerce_remove_roles();
woocommerce_init_roles();
echo '
' . __( 'Roles successfully reset', 'woocommerce' ) . '
';
break;
default:
$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 ) ) {
echo '
' . sprintf( __( 'There was an error calling %s::%s', 'woocommerce' ), get_class( $callback[0] ), $callback[1] ) . '
';
} else {
echo '
' . sprintf( __( 'There was an error calling %s', 'woocommerce' ), $callback ) . '
';
}
}
}
}
}
?>
|
|
version ); ?> |
|
|
|
|
|
' . implode( ', ', $wc_plugins ) . '';
?> |
|
|
|
|
|
|
'.__( 'Yes', 'woocommerce' ).'' : ''.__( 'No', 'woocommerce' ).''; ?> |
|
array(
'option' => 'woocommerce_shop_page_id',
'shortcode' => ''
),
__( 'Cart Page', 'woocommerce' ) => array(
'option' => 'woocommerce_cart_page_id',
'shortcode' => '[woocommerce_cart]'
),
__( 'Checkout Page', 'woocommerce' ) => array(
'option' => 'woocommerce_checkout_page_id',
'shortcode' => '[woocommerce_checkout]'
),
__( 'Pay Page', 'woocommerce' ) => array(
'option' => 'woocommerce_pay_page_id',
'shortcode' => '[woocommerce_pay]'
),
__( 'Thanks Page', 'woocommerce' ) => array(
'option' => 'woocommerce_thanks_page_id',
'shortcode' => '[woocommerce_thankyou]'
),
__( 'My Account Page', 'woocommerce' ) => array(
'option' => 'woocommerce_myaccount_page_id',
'shortcode' => '[woocommerce_my_account]'
),
__( 'Edit Address Page', 'woocommerce' ) => array(
'option' => 'woocommerce_edit_address_page_id',
'shortcode' => '[woocommerce_edit_address]'
),
__( 'View Order Page', 'woocommerce' ) => array(
'option' => 'woocommerce_view_order_page_id',
'shortcode' => '[woocommerce_view_order]'
),
__( 'Change Password Page', 'woocommerce' ) => array(
'option' => 'woocommerce_change_password_page_id',
'shortcode' => '[woocommerce_change_password]'
)
);
$alt = 1;
foreach ( $check_pages as $page_name => $values ) {
if ( $alt == 1 ) echo ''; else echo '
';
echo '' . esc_html( $page_name ) . ' | ';
$error = false;
$page_id = get_option($values['option']);
// Page ID check
if ( ! $page_id ) {
echo '' . __( 'Page not set', 'woocommerce' ) . '';
$error = true;
} else {
// Shortcode check
if ( $values['shortcode'] ) {
$page = get_post( $page_id );
if ( ! strstr( $page->post_content, $values['shortcode'] ) ) {
echo '' . sprintf(__( 'Page does not contain the shortcode: %s', 'woocommerce' ), $values['shortcode'] ) . '';
$error = true;
}
}
}
if ( ! $error ) echo '#' . absint( $page_id ) . ' - ' . get_permalink( $page_id ) . '';
echo ' |
';
$alt = $alt * -1;
}
?>
|
|
'names', 'hide_empty' => 0 ) );
echo implode( ', ', array_map( 'esc_html', $order_statuses ) );
?> |
|
|
|
|
|
|
|
|
|
|
|
|
' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'woocommerce' ), wp_convert_bytes_to_hr( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '';
} else {
echo '' . wp_convert_bytes_to_hr( $memory ) . '';
}
?> |
|
' . __( 'Yes', 'woocommerce' ) . ''; else echo '' . __( 'No', 'woocommerce' ) . ''; ?> |
|
plugin_path() . '/logs/paypal.txt', 'a' ) )
echo '' . __( 'Log directory is writable.', 'woocommerce' ) . '';
else
echo '' . __( 'Log directory (woocommerce/logs/ ) is not writable. Logging will not be possible.', 'woocommerce' ) . '';
?> |
|
';
$posting['fsockopen_curl']['success'] = false;
}
// WP Remote Post Check
$posting['wp_remote_post']['name'] = __( 'WP Remote Post Check','woocommerce');
$request['cmd'] = '_notify-validate';
$params = array(
'sslverify' => false,
'timeout' => 60,
'user-agent' => 'WooCommerce/' . $woocommerce->version,
'body' => $request
);
$response = wp_remote_post( 'https://www.paypal.com/cgi-bin/webscr', $params );
if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
$posting['wp_remote_post']['note'] = __('wp_remote_post() was successful - PayPal IPN is working.', 'woocommerce' );
$posting['wp_remote_post']['success'] = true;
} elseif ( is_wp_error( $response ) ) {
$posting['wp_remote_post']['note'] = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider. Error:', 'woocommerce' ) . ' ' . $response->get_error_message();
$posting['wp_remote_post']['success'] = false;
} else {
$posting['wp_remote_post']['note'] = __( 'wp_remote_post() failed. PayPal IPN may not work with your server.', 'woocommerce' );
$posting['wp_remote_post']['success'] = false;
}
$posting = apply_filters( 'wc_debug_posting', $posting );
?>
|
|
|
$tool) { ?>
|
|