HEX
Server: Apache
System: Linux webm020.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: bohousj (181416)
PHP: 8.4.22
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/b/o/h/bohousj/www/wp-content/plugins/woo-product-bundle/assets/js/blocks.js
const {registerCheckoutFilters} = window.wc.blocksCheckout;

const woosbCartItemClass = (defaultValue, extensions, args) => {
    const isCartContext = args?.context === 'cart';

    if (!isCartContext) {
        return defaultValue;
    }

    if (args?.cartItem?.woosb_bundles) {
        defaultValue += ' woosb-bundles';
    }

    if (args?.cartItem?.woosb_bundled) {
        defaultValue += ' woosb-bundled';
    }

    if (args?.cartItem?.woosb_hide_bundled) {
        defaultValue += ' woosb-hide-bundled';
    }

    if (args?.cartItem?.woosb_fixed_price) {
        defaultValue += ' woosb-fixed-price';
    }

    return defaultValue;
};

const woosbShowRemoveItemLink = (defaultValue, extensions, args) => {
    const isCartContext = args?.context === 'cart';

    if (!isCartContext) {
        return defaultValue;
    }

    if (args?.cartItem?.woosb_bundled) {
        return false;
    }

    return defaultValue;
};

registerCheckoutFilters('woosb-blocks', {
    cartItemClass: woosbCartItemClass, showRemoveItemLink: woosbShowRemoveItemLink,
});

// https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/third-party-developers/extensibility/checkout-block/available-filters/cart-line-items.md