WooCommerce Code Reference

SettingsUIPageInterface

Contract for settings pages that opt into the settings UI renderer.

Tags
since
10.9.0

Table of Contents

get_page_id()  : string
Get the stable page id used for scoping the settings UI.
get_save_adapter()  : string
Get the default save adapter for fields on this page.
get_schema()  : array<string|int, mixed>
Build the canonical settings schema for a section.
get_script_handles()  : array<string|int, string>
Get script handles that must be loaded before the settings UI app mounts.

Methods

get_save_adapter()

Get the default save adapter for fields on this page.

public get_save_adapter(string $section) : string

Supported values are form_post and none.

Parameters
$section : string

Section id. Empty string means the default section.

Tags
since
10.9.0
Return values
string

get_schema()

Build the canonical settings schema for a section.

public get_schema(string $section) : array<string|int, mixed>
Parameters
$section : string

Section id. Empty string means the default section.

Tags
since
10.9.0
Return values
array<string|int, mixed>

get_script_handles()

Get script handles that must be loaded before the settings UI app mounts.

public get_script_handles(string $section) : array<string|int, string>
Parameters
$section : string

Section id. Empty string means the default section.

Tags
since
10.9.0
Return values
array<string|int, string>