WooCommerce Code Reference

WC_Register_WP_Admin_Settings
in package

Register WP admin settings class.

Table of Contents

$object  : WC_Register_WP_Admin_Settings
Contains the current class to pull settings from.
__construct()  : mixed
Hooks into the settings API and starts registering our settings.
register_email_group()  : array
Register's all of our different notification emails as sub groups of email settings.
register_email_settings()  : array
Registers all of the setting form fields for emails to each email type's group.
register_page_group()  : array
Registers a setting group, based on admin page ID & label as parent group.
register_page_settings()  : array
Registers settings to a specific group.
register_setting()  : array|bool
Register a setting into the format expected for the Settings REST API.

Properties

Methods

register_email_group()

Register's all of our different notification emails as sub groups of email settings.

public register_email_group(array $groups) : array
Parameters
$groups : array

Existing registered groups.

Tags
since
3.0.0
Return values
array

register_email_settings()

Registers all of the setting form fields for emails to each email type's group.

public register_email_settings(array $settings) : array
Parameters
$settings : array

Existing registered settings.

Tags
since
3.0.0
Return values
array

register_page_group()

Registers a setting group, based on admin page ID & label as parent group.

public register_page_group(array $groups) : array
Parameters
$groups : array

Array of previously registered groups.

Tags
since
3.0.0
Return values
array

register_page_settings()

Registers settings to a specific group.

public register_page_settings(array $settings) : array
Parameters
$settings : array

Existing registered settings.

Tags
since
3.0.0
Return values
array

register_setting()

Register a setting into the format expected for the Settings REST API.

public register_setting(array $setting) : array|bool
Parameters
$setting : array

Setting data.

Tags
since
3.0.0
Return values
array|bool