Repository: woocommerce/woocommerce (PHP)

Issue:
[Launch Your Store] Site Visibility tab
## Issue Description
Move the site visibility settings to a new tab named "Site Visibility".

![Image](https://github.com/woocommerce/woocommerce/assets/9312929/d87a98af-735c-4a89-bfeb-f3bc35d8c3ae)

## Acceptance Criteria
* Create a settings tab named "Site Visibility"
* Move the existing site visibility section from the General tab to the new tab
* Update the link in the homescreen dropdown and front-end banner.





Fix (patch):
diff --git a/plugins/woocommerce-admin/client/launch-your-store/settings/slotfill.js b/plugins/woocommerce-admin/client/launch-your-store/settings/slotfill.js
index c9d8ece38ce38..7cea29f7ec55a 100644
--- a/plugins/woocommerce-admin/client/launch-your-store/settings/slotfill.js
+++ b/plugins/woocommerce-admin/client/launch-your-store/settings/slotfill.js
@@ -205,7 +205,7 @@ const SiteVisibilitySlotFill = () => {
 
 export const registerSiteVisibilitySlotFill = () => {
 	registerPlugin( 'woocommerce-admin-site-visibility-settings-slotfill', {
-		scope: 'woocommerce-settings',
+		scope: 'woocommerce-site-visibility-settings',
 		render: SiteVisibilitySlotFill,
 	} );
 };
diff --git a/plugins/woocommerce-admin/client/launch-your-store/status/index.js b/plugins/woocommerce-admin/client/launch-your-store/status/index.js
index 8b8d3e535aa16..f0084259b550d 100644
--- a/plugins/woocommerce-admin/client/launch-your-store/status/index.js
+++ b/plugins/woocommerce-admin/client/launch-your-store/status/index.js
@@ -50,7 +50,7 @@ export const LaunchYourStoreStatus = ( { comingSoon, storePagesOnly } ) => {
 							<MenuGroup className="woocommerce-lys-status-popover">
 								<MenuItem
 									href={ getAdminLink(
-										'admin.php?page=wc-settings'
+										'admin.php?page=wc-settings&tab=site-visibility'
 									) }
 								>
 									<Icon icon={ cog } size={ 24 } />
diff --git a/plugins/woocommerce-admin/client/settings/settings-slots.js b/plugins/woocommerce-admin/client/settings/settings-slots.js
index 54b19091563b5..61d920ebf5ac3 100644
--- a/plugins/woocommerce-admin/client/settings/settings-slots.js
+++ b/plugins/woocommerce-admin/client/settings/settings-slots.js
@@ -19,8 +19,8 @@ export const possiblyRenderSettingsSlots = () => {
 		{ id: 'wc_tax_settings_slotfill', scope: 'woocommerce-tax-settings' },
 		{ id: 'wc_settings_slotfill', scope: 'woocommerce-settings' },
 		{
-			id: 'wc_settings_general_site_visibility_slotfill',
-			scope: 'woocommerce-settings',
+			id: 'wc_settings_site_visibility_slotfill',
+			scope: 'woocommerce-site-visibility-settings',
 		},
 	];
 
diff --git a/plugins/woocommerce/changelog/46140-update-46133-site-visibility-tab b/plugins/woocommerce/changelog/46140-update-46133-site-visibility-tab
new file mode 100644
index 0000000000000..b7eea1b32bfbd
--- /dev/null
+++ b/plugins/woocommerce/changelog/46140-update-46133-site-visibility-tab
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Move site visibility settings to a new tab
\ No newline at end of file
diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-settings.php b/plugins/woocommerce/includes/admin/class-wc-admin-settings.php
index 8a132477274b4..bc3ce2468ce6e 100644
--- a/plugins/woocommerce/includes/admin/class-wc-admin-settings.php
+++ b/plugins/woocommerce/includes/admin/class-wc-admin-settings.php
@@ -57,6 +57,7 @@ public static function get_settings_pages() {
 				$settings[] = include __DIR__ . '/settings/class-wc-settings-accounts.php';
 				$settings[] = include __DIR__ . '/settings/class-wc-settings-emails.php';
 				$settings[] = include __DIR__ . '/settings/class-wc-settings-integrations.php';
+				$settings[] = include __DIR__ . '/settings/class-wc-settings-site-visibility.php';
 				$settings[] = include __DIR__ . '/settings/class-wc-settings-advanced.php';
 
 				self::$settings = apply_filters( 'woocommerce_get_settings_pages', $settings );
diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-general.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-general.php
index 328c8005aef47..587fba84c329b 100644
--- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-general.php
+++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-general.php
@@ -217,11 +217,6 @@ protected function get_settings_for_default_section() {
 					'id'   => 'general_options',
 				),
 
-				array(
-					'id'   => 'wc_settings_general_site_visibility_slotfill',
-					'type' => 'slotfill_placeholder',
-				),
-
 				array(
 					'title' => __( 'Currency options', 'woocommerce' ),
 					'type'  => 'title',
diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-site-visibility.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-site-visibility.php
new file mode 100644
index 0000000000000..34baf1270c1bd
--- /dev/null
+++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-site-visibility.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * WooCommerce site visibility settings
+ *
+ * @package  WooCommerce\Admin
+ */
+
+defined( 'ABSPATH' ) || exit;
+
+/**
+ * Settings for API.
+ */
+if ( class_exists( 'WC_Settings_Site_Visibility', false ) ) {
+	return new WC_Settings_Site_Visibility();
+}
+
+/**
+ * WC_Settings_Advanced.
+ */
+class WC_Settings_Site_Visibility extends WC_Settings_Page {
+
+	/**
+	 * Constructor.
+	 */
+	public function __construct() {
+		$this->id    = 'site-visibility';
+		$this->label = __( 'Site visibility', 'woocommerce' );
+
+		parent::__construct();
+	}
+
+
+	/**
+	 * Get settings for the default section.
+	 *
+	 * @return array
+	 */
+	protected function get_settings_for_default_section() {
+		$settings =
+			array(
+				array(
+					'id'   => 'wc_settings_site_visibility_slotfill',
+					'type' => 'slotfill_placeholder',
+				),
+			);
+
+		return $settings;
+	}
+}
+
+
+return new WC_Settings_Site_Visibility();
diff --git a/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php b/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php
index c26b6154d07a9..862a6d4a19b9c 100644
--- a/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php
+++ b/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php
@@ -12,7 +12,7 @@ class LaunchYourStore {
 	 * Constructor.
 	 */
 	public function __construct() {
-		add_action( 'woocommerce_update_options_general', array( $this, 'save_site_visibility_options' ) );
+		add_action( 'woocommerce_update_options_site-visibility', array( $this, 'save_site_visibility_options' ) );
 		add_action( 'current_screen', array( $this, 'maybe_create_coming_soon_page' ) );
 		if ( is_admin() ) {
 			add_filter( 'woocommerce_admin_shared_settings', array( $this, 'preload_settings' ) );