Automattic\WooCommerce\Admin\API

Options::get_options()publicWC 1.0

Gets an array of options and respective values.

Method of the class: Options{}

No Hooks.

Return

Array. Options object with option values.

Usage

$Options = new Options();
$Options->get_options( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Options::get_options() code WC 7.3.0

public function get_options( $request ) {
	$params  = explode( ',', $request['options'] );
	$options = array();

	if ( ! is_array( $params ) ) {
		return array();
	}

	foreach ( $params as $option ) {
		$options[ $option ] = get_option( $option );
	}

	return $options;
}