Automattic\WooCommerce\Internal\Admin\Settings\SettingsUIPages

ProductsSettingsPageAdapter::get_schemapublicWC 1.0

Build the canonical settings schema for a section.

Method of the class: ProductsSettingsPageAdapter{}

No Hooks.

Returns

Array.

Usage

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

ProductsSettingsPageAdapter::get_schema() code WC 10.9.1

public function get_schema( string $section ): array {
	$schema = parent::get_schema( $section );

	$schema['shell']['title'] = __( 'Product settings', 'woocommerce' );

	if ( '' === $section ) {
		$schema = $this->with_field_options(
			$schema,
			'woocommerce_shop_page_id',
			$this->get_page_options()
		);
	}

	return $schema;
}