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

15 lines
312 B
JavaScript

/** @format */
const updateSettings = operations => settingFields => {
const resourceKey = 'settings';
Object.keys( settingFields ).map( group =>
operations.update( [ resourceKey + '/' + group ], {
[ resourceKey + '/' + group ]: settingFields[ group ],
} )
);
};
export default {
updateSettings,
};