1document.addEventListener( 'DOMContentLoaded', function() { 2 if ( 'undefined' == typeof window.wc.blocksCheckout ) return; 3 4 const { registerCheckoutFilters } = window.wc.blocksCheckout; 5 6 if ( 'undefined' == typeof registerCheckoutFilters ) return; 7 8 registerCheckoutFilters( 'mkl-pc-stock-management', { 9 // Do not show the Remove item link for linked products. 10 showRemoveItemLink: ( value, extensions, cartItem ) => { 11 if ( extensions.mkl_pc_stock_management && extensions.mkl_pc_stock_management.parent_item ) { 12 return false; 13 } 14 return value; 15 }, 16 17 // Adjust cart item class of the cart line items. 18 cartItemClass: ( value, extensions, args ) => { 19 if ( extensions.mkl_pc_stock_management && extensions.mkl_pc_stock_management.hide_item ) { 20 value += ' configurator-hidden'; 21 } 22 if ( extensions.mkl_pc_stock_management && extensions.mkl_pc_stock_management.parent_item ) { 23 value += ' configurator-linked-product'; 24 } 25 return value; 26 } 27 } ); 28} );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.