diff --git a/inc/admin-pages/customer-panel/class-checkout-admin-page.php b/inc/admin-pages/customer-panel/class-checkout-admin-page.php index 5d5f044ea..dd07a99f1 100644 --- a/inc/admin-pages/customer-panel/class-checkout-admin-page.php +++ b/inc/admin-pages/customer-panel/class-checkout-admin-page.php @@ -166,9 +166,10 @@ public function output(): void { wu_get_template( 'base/centered', [ - 'screen' => get_current_screen(), - 'page' => $this, - 'content' => '[wu_checkout slug="wu-checkout"]', + 'screen' => get_current_screen(), + 'page' => $this, + 'page_title' => $this->get_title(), + 'content' => '[wu_checkout slug="wu-checkout"]', ] ); } diff --git a/tests/WP_Ultimo/Checkout/Signup_Fields/Signup_Field_Site_Url_Test.php b/tests/WP_Ultimo/Checkout/Signup_Fields/Signup_Field_Site_Url_Test.php index 54cec9ea3..47ae7b69c 100644 --- a/tests/WP_Ultimo/Checkout/Signup_Fields/Signup_Field_Site_Url_Test.php +++ b/tests/WP_Ultimo/Checkout/Signup_Fields/Signup_Field_Site_Url_Test.php @@ -202,6 +202,7 @@ public function test_to_fields_array_with_domain_selection(): void { 'display_field_attachments' => false, 'enable_domain_selection' => true, 'available_domains' => "example.com\nexample.org", + 'available_domains_multi' => "example.com\nexample.org", ]; $this->field->set_attributes($attributes); diff --git a/tests/WP_Ultimo/List_Tables/Checkout_Form_List_Table_Test.php b/tests/WP_Ultimo/List_Tables/Checkout_Form_List_Table_Test.php index 57b946f6a..f82e3b0e7 100644 --- a/tests/WP_Ultimo/List_Tables/Checkout_Form_List_Table_Test.php +++ b/tests/WP_Ultimo/List_Tables/Checkout_Form_List_Table_Test.php @@ -65,19 +65,20 @@ public function test_get_columns_returns_expected_keys(): void { $this->assertIsArray( $columns ); $this->assertArrayHasKey( 'cb', $columns ); $this->assertArrayHasKey( 'name', $columns ); + $this->assertArrayHasKey( 'active', $columns ); $this->assertArrayHasKey( 'slug', $columns ); $this->assertArrayHasKey( 'steps', $columns ); $this->assertArrayHasKey( 'id', $columns ); } /** - * Test get_columns returns 5 columns. + * Test get_columns returns 6 columns. */ - public function test_get_columns_returns_five_columns(): void { + public function test_get_columns_returns_six_columns(): void { $columns = $this->table->get_columns(); - $this->assertCount( 5, $columns ); + $this->assertCount( 6, $columns ); } // ========================================================================= diff --git a/tests/unit/API_Schema_Test.php b/tests/unit/API_Schema_Test.php index 7a75ab349..eec810ba3 100644 --- a/tests/unit/API_Schema_Test.php +++ b/tests/unit/API_Schema_Test.php @@ -248,7 +248,7 @@ public function test_checkout_form_create_optional_fields(): void { public function test_checkout_form_create_template_enum(): void { $schema = $this->load_schema('checkout-form-create.php'); $this->assertArrayHasKey('template', $schema); - $this->assertSame(['blank', 'single-step', 'multi-step'], $schema['template']['enum']); + $this->assertSame(['blank', 'single-step', 'multi-step', 'simple'], $schema['template']['enum']); } /** @@ -305,7 +305,7 @@ public function test_checkout_form_update_settings_type_is_array(): void { public function test_checkout_form_update_template_enum(): void { $schema = $this->load_schema('checkout-form-update.php'); $this->assertArrayHasKey('template', $schema); - $this->assertSame(['blank', 'single-step', 'multi-step'], $schema['template']['enum']); + $this->assertSame(['blank', 'single-step', 'multi-step', 'simple'], $schema['template']['enum']); } // ========================================================================= diff --git a/tests/unit/Checkout_Request_Test.php b/tests/unit/Checkout_Request_Test.php index b46bf0f88..45799a0fd 100644 --- a/tests/unit/Checkout_Request_Test.php +++ b/tests/unit/Checkout_Request_Test.php @@ -7,7 +7,7 @@ public function test_request_or_session_accepts_empty_string(): void { // Ensure empty string in request overrides any default/session value $_REQUEST['discount_code'] = ''; - $checkout = new \WP_Ultimo\Checkout\Checkout(); + $checkout = \WP_Ultimo\Checkout\Checkout::get_instance(); $value = $checkout->request_or_session('discount_code', 'DEFAULT'); @@ -25,7 +25,7 @@ public function test_request_or_session_accepts_empty_string(): void { */ public function test_checkout_variables_always_has_discount_code_string(): void { - $checkout = new \WP_Ultimo\Checkout\Checkout(); + $checkout = \WP_Ultimo\Checkout\Checkout::get_instance(); $vars = $checkout->get_checkout_variables();