File "frontend.js"
Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/attribute-filter/frontend.js
File size: 744 bytes
MIME-type: text/x-java
Charset: utf-8
/**
* External dependencies
*/
import { withRestApiHydration } from '@woocommerce/block-hocs';
import { renderFrontend } from '@woocommerce/base-utils';
/**
* Internal dependencies
*/
import Block from './block.js';
const getProps = ( el ) => {
return {
attributes: {
attributeId: parseInt( el.dataset.attributeId || 0, 10 ),
showCounts: el.dataset.showCounts === 'true',
queryType: el.dataset.queryType,
heading: el.dataset.heading,
headingLevel: el.dataset.headingLevel || 3,
displayStyle: el.dataset.displayStyle,
showFilterButton: el.dataset.showFilterButton === 'true',
},
};
};
renderFrontend( {
selector: '.wp-block-woocommerce-attribute-filter',
Block: withRestApiHydration( Block ),
getProps,
} );