WC_Register_WP_Admin_Settings::register_email_settings()
Registers all of the setting form fields for emails to each email type's group.
Method of the class: WC_Register_WP_Admin_Settings{}
No Hooks.
Return
Array
.
Usage
$WC_Register_WP_Admin_Settings = new WC_Register_WP_Admin_Settings(); $WC_Register_WP_Admin_Settings->register_email_settings( $settings );
- $settings(array) (required)
- Existing registered settings.
Changelog
Since 3.0.0 | Introduced. |
WC_Register_WP_Admin_Settings::register_email_settings() WC Register WP Admin Settings::register email settings code WC 9.4.2
public function register_email_settings( $settings ) { foreach ( $this->object->form_fields as $id => $setting ) { $setting['id'] = $id; $setting['option_key'] = array( $this->object->get_option_key(), $id ); $new_setting = $this->register_setting( $setting ); if ( $new_setting ) { $settings[] = $new_setting; } } return $settings; }