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

17 lines
334 B
JavaScript

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