WordPress at Your Fingertips
function is not described

WC_Settings_Emails::save() public WC 1.0

Save settings.

{} It's a method of the class: WC_Settings_Emails{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Settings_Emails = new WC_Settings_Emails();
$WC_Settings_Emails->save();

Code of WC_Settings_Emails::save() WC 5.9.0

public function save() {
	global $current_section;

	if ( ! $current_section ) {
		$this->save_settings_for_current_section();
		$this->do_update_options_action();
	} else {
		$wc_emails = WC_Emails::instance();

		if ( in_array( $current_section, array_map( 'sanitize_title', array_keys( $wc_emails->get_emails() ) ), true ) ) {
			foreach ( $wc_emails->get_emails() as $email_id => $email ) {
				if ( sanitize_title( $email_id ) === $current_section ) {
					$this->do_update_options_action( $email->id );
				}
			}
		} else {
			$this->save_settings_for_current_section();
			$this->do_update_options_action();
		}
	}
}