Automattic\WooCommerce\Internal\Admin\Settings

LegacySettingsPageAdapter::get_schemapublicWC 1.0

Build the canonical settings schema for a section.

Method of the class: LegacySettingsPageAdapter{}

No Hooks.

Returns

Array.

Usage

$LegacySettingsPageAdapter = new LegacySettingsPageAdapter();
$LegacySettingsPageAdapter->get_schema( $section ): array;
$section(string) (required)
Section id. Empty string means the default section.

LegacySettingsPageAdapter::get_schema() code WC 10.9.1

public function get_schema( string $section ): array {
	$schema = SettingsUISchema::from_legacy_settings(
		$this->settings_page->get_id(),
		$section,
		$this->settings_page->get_label(),
		$this->settings_page->get_settings( $section ),
		$this->get_save_adapter( $section )
	);

	$schema['shell']['sectionNavigation'] = $this->get_section_navigation( $section );

	return $schema;
}