woocommerce_update_options

Update all settings which are passed.

Description

woocommerce_update_options( (array) $options, (null) $data = null ); 

Parameters (2)

0. $options (array)
The options.
1. $data — Optional. (null) => null
The data.

Usage

  1. if ( !function_exists( 'woocommerce_update_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/admin/wc-admin-functions.php'; 
  3.  
  4. // The options. 
  5. $options = array(); 
  6.  
  7. // The data. 
  8. $data = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = woocommerce_update_options($options, $data); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/admin/wc-admin-functions.php  
  1. function woocommerce_update_options( $options, $data = null ) { 
  2.  
  3. if ( ! class_exists( 'WC_Admin_Settings', false ) ) { 
  4. include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' ); 
  5.  
  6. WC_Admin_Settings::save_fields( $options, $data );