@shopgate/pwa-common-commerce
Version:
Commerce library for the Shopgate Connect PWA.
7 lines • 679 B
JavaScript
import{logger}from'@shopgate/pwa-core';import{UPDATE_METADATA}from"../constants";/**
* Changes the metadata of an existing product in the store.
* @param {string} productId The product ID to change the metadata for.
* @param {Object} [metadata=null] The metadata to update.
* @returns {Function} A redux thunk.
* @deprecated
*/var updateMetaData=function updateMetaData(productId){var metadata=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return function(dispatch){if(!metadata){logger.warn('updateMetaData was called without new metadata!');return;}dispatch({type:UPDATE_METADATA,productId:productId,metadata:metadata});};};export default updateMetaData;