WooCommerce::register_wp_admin_settings()
Register WC settings from WP-API to the REST API.
This method used to be part of the now removed Legacy REST API.
Method of the class: WooCommerce{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->register_wp_admin_settings();
Changelog
Since 9.0.0 | Introduced. |
WooCommerce::register_wp_admin_settings() WooCommerce::register wp admin settings code WC 9.2.3
private 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' ); } }