Automattic\WooCommerce\Internal\Admin\Logging
Settings::save_settings
Handle the submission of the settings form and update the settings values.
Method of the class: Settings{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Settings = new Settings(); $Settings->save_settings( $view ): void;
- $view(string) (required)
- The current view within the Logs tab.
Settings::save_settings() Settings::save settings code WC 10.7.0
public function save_settings( string $view ): void {
$is_saving = 'settings' === $view && isset( $_POST['save_settings'] );
if ( $is_saving ) {
check_admin_referer( self::PREFIX . 'settings' );
if ( ! current_user_can( 'manage_woocommerce' ) ) {
wp_die( esc_html__( 'You do not have permission to manage logging settings.', 'woocommerce' ) );
}
$settings = $this->get_settings_definitions();
WC_Admin_Settings::save_fields( $settings );
}
}