Automattic\WooCommerce\Admin\API
Options::update_options()
Updates an array of objects.
Method of the class: Options{}
No Hooks.
Return
Array
. Options object with a boolean if the option was updated.
Usage
$Options = new Options(); $Options->update_options( $request );
- $request(WP_REST_Request) (required)
- Full details about the request.
Options::update_options() Options::update options code WC 9.6.1
public function update_options( $request ) { $params = $request->get_json_params(); $updated = array(); if ( ! is_array( $params ) ) { return array(); } foreach ( $params as $key => $value ) { $updated[ $key ] = update_option( $key, $value ); } return $updated; }