Cat dashboard loading time (#34292)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
This commit is contained in:
parent
c6c2828f60
commit
332204723b
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: update
|
||||||
|
|
||||||
|
Improve the loading time of WooCommerce setup widget for large databases
|
|
@ -187,7 +187,7 @@ if ( ! class_exists( 'WC_Admin_Dashboard_Setup', false ) ) :
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $this->get_task_list() || $this->get_task_list()->is_complete() || $this->get_task_list()->is_hidden() ) {
|
if ( ! $this->get_task_list() || $this->get_task_list()->is_hidden() || $this->get_task_list()->is_complete() ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,11 +88,16 @@ class WC_Admin_Dashboard_Setup_Test extends WC_Unit_Test_Case {
|
||||||
* Tests widget does not display when task list is complete.
|
* Tests widget does not display when task list is complete.
|
||||||
*/
|
*/
|
||||||
public function test_widget_does_not_display_when_task_list_complete() {
|
public function test_widget_does_not_display_when_task_list_complete() {
|
||||||
$task_list = new class {
|
// phpcs:disable Squiz.Commenting
|
||||||
|
$task_list = new class() {
|
||||||
public function is_complete() {
|
public function is_complete() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
public function is_hidden() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
// phpcs:enable Squiz.Commenting
|
||||||
$widget = $this->get_widget();
|
$widget = $this->get_widget();
|
||||||
$widget->set_task_list( $task_list );
|
$widget->set_task_list( $task_list );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue