diff --git a/plugins/woocommerce-admin/client/settings/index.js b/plugins/woocommerce-admin/client/settings/index.js index 4003192aa2d..94972122c2c 100644 --- a/plugins/woocommerce-admin/client/settings/index.js +++ b/plugins/woocommerce-admin/client/settings/index.js @@ -1,7 +1,9 @@ /** * External dependencies */ -import { getQuery } from '@woocommerce/navigation'; +import { getQuery, getNewPath } from '@woocommerce/navigation'; +import { Button } from '@wordpress/components'; +import { Icon, chevronLeft } from '@wordpress/icons'; import { useEffect } from '@wordpress/element'; /** @@ -49,6 +51,10 @@ const Settings = ( { params } ) => { <>
+
diff --git a/plugins/woocommerce-admin/client/settings/style.scss b/plugins/woocommerce-admin/client/settings/style.scss index b35bddb8e23..8811b9a4590 100644 --- a/plugins/woocommerce-admin/client/settings/style.scss +++ b/plugins/woocommerce-admin/client/settings/style.scss @@ -25,6 +25,11 @@ .woocommerce-settings-layout-navigation { min-width: 300px; color: white; + + .components-button { + font-size: 16px; + color: white; + } } .woocommerce-settings-layout-content { @@ -79,11 +84,12 @@ h4 { margin: 0; - width: 200px; + min-width: 200px; } .components-base-control { flex: 1; + overflow: auto; } .components-input-control__container { diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php index 1dab5aa6042..2ff63a545c8 100644 --- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php +++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php @@ -152,6 +152,23 @@ if ( ! class_exists( 'WC_Settings_Page', false ) ) : $section_settings_data[] = $section_setting; } + + if ( count( $section_settings ) === 0 ) { + global $current_section; + $saved_current_section = $current_section; + $current_section = $section_id; + ob_start(); + do_action( 'woocommerce_settings_' . $this->id ); + $html = ob_get_contents(); + $section_settings_data[] = array( + 'type' => 'custom', + 'content' => trim( $html ), + ); + ob_end_clean(); + + $current_section = $saved_current_section; + } + $sections_data[ $section_id ] = array( 'label' => html_entity_decode( $section_label ), 'settings' => $section_settings_data,