From 5c992339056116c74955218f782e1862598cee25 Mon Sep 17 00:00:00 2001 From: Moon Date: Mon, 22 Feb 2021 19:46:31 -0800 Subject: [PATCH] Minor fixes * Removed extra double quotation from the image tag * Fixed typo in the init() method * Moved init() method body into the constructor -- a separate method is not necessary --- assets/css/dashboard-setup.scss | 14 +++++++---- .../admin/class-wc-admin-dashboard-setup.php | 23 +++++++------------ .../views/html-admin-dashboard-setup.php | 2 +- .../class-wc-admin-dashboard-setup-test.php | 2 +- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/assets/css/dashboard-setup.scss b/assets/css/dashboard-setup.scss index 5a2d0fe6e37..cee2344428e 100644 --- a/assets/css/dashboard-setup.scss +++ b/assets/css/dashboard-setup.scss @@ -12,15 +12,17 @@ .progress-wrapper { border: 1px solid #757575; - border-radius: 20px; + border-radius: 16px; font-size: 0.9em; - padding: 2px 10px 2px 7px; + padding: 2px 8px 2px 8px; display: inline-block; + box-sizing: border-box; } .progress-wrapper span { position: relative; - top: -2px; + top: -3px; + color: #757575; } .description div { @@ -35,14 +37,16 @@ } .circle-progress { + margin-top: 1px; + margin-left: -3px; circle { - stroke: #949494; + stroke: #f0f0f0; stroke-width: 1px; } .bar { - stroke: #f0f0f0; + stroke: #949494; } } } diff --git a/includes/admin/class-wc-admin-dashboard-setup.php b/includes/admin/class-wc-admin-dashboard-setup.php index 6806b1de5b1..8fdbc1e94de 100644 --- a/includes/admin/class-wc-admin-dashboard-setup.php +++ b/includes/admin/class-wc-admin-dashboard-setup.php @@ -70,24 +70,17 @@ if ( ! class_exists( 'WC_Admin_Dashboard_Setup', false ) ) : $this->populate_general_tasks(); $this->populate_payment_tasks(); $this->completed_tasks_count = $this->get_completed_tasks_count(); - $this->init(); + add_meta_box( + 'wc_admin_dashboard_setup', + __( 'WooCommerce Setup', 'woocommerce' ), + array( $this, 'render' ), + 'dashboard', + 'normal', + 'high' + ); } } - /** - * Hook meta_box - */ - public function init() { - add_meta_box( - 'wc_admin_dasbharod_setup', - __( 'WooCommerce Setup', 'woocommerce' ), - array( $this, 'render' ), - 'dashboard', - 'normal', - 'high' - ); - } - /** * Render meta box output. */ diff --git a/includes/admin/views/html-admin-dashboard-setup.php b/includes/admin/views/html-admin-dashboard-setup.php index 62a2cdc5fa2..ddc7b6b85f9 100644 --- a/includes/admin/views/html-admin-dashboard-setup.php +++ b/includes/admin/views/html-admin-dashboard-setup.php @@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
diff --git a/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php b/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php index 878e938545a..82ebf87cc05 100644 --- a/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php +++ b/tests/php/includes/admin/class-wc-admin-dashboard-setup-test.php @@ -71,7 +71,7 @@ class WC_Admin_Dashboard_Setup_Test extends WC_Unit_Test_Case { update_option( 'woocommerce_task_list_hidden', false ); $this->get_widget(); - $this->assertArrayHasKey( 'wc_admin_dasbharod_setup', $wp_meta_boxes['dashboard']['normal']['high'] ); + $this->assertArrayHasKey( 'wc_admin_dashboard_setup', $wp_meta_boxes['dashboard']['normal']['high'] ); } /**