woocommerce/plugins/woocommerce-admin/client/wc-api/options/mutations.js

16 lines
330 B
JavaScript
Raw Normal View History

/** @format */
/**
* Internal dependencies
*/
import { getResourceName } from '../utils';
const updateOptions = operations => options => {
const resourceName = getResourceName( 'options', Object.keys( options ) );
operations.update( [ resourceName ], { [ resourceName ]: options } );
};
export default {
updateOptions,
};