diff --git a/plugins/woocommerce-blocks/assets/js/blocks/products/all-products/deprecated.js b/plugins/woocommerce-blocks/assets/js/blocks/products/all-products/deprecated.js index 5a5aadbf684..48e118f3c60 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/products/all-products/deprecated.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/products/all-products/deprecated.js @@ -33,4 +33,32 @@ const v1 = { }, }; -export default [ v1 ]; +const v2 = { + attributes: Object.assign( {}, attributeDefinitions, { + rows: { type: 'number', default: 1 }, + } ), + save( { attributes } ) { + const dataAttributes = {}; + Object.keys( attributes ) + .sort() + .forEach( ( key ) => { + dataAttributes[ key ] = attributes[ key ]; + } ); + const data = { + 'data-attributes': JSON.stringify( dataAttributes ), + }; + return ( +