WC_API::register_wp_admin_settings()publicWC 3.0.0

Register WC settings from WP-API to the REST API.

Method of the class: WC_API{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_API = new WC_API();
$WC_API->register_wp_admin_settings();

Changelog

Since 3.0.0 Introduced.

WC_API::register_wp_admin_settings() code WC 8.7.0

public function register_wp_admin_settings() {
	$pages = WC_Admin_Settings::get_settings_pages();
	foreach ( $pages as $page ) {
		new WC_Register_WP_Admin_Settings( $page, 'page' );
	}

	$emails = WC_Emails::instance();
	foreach ( $emails->get_emails() as $email ) {
		new WC_Register_WP_Admin_Settings( $email, 'email' );
	}
}