Hi @gkaralov
The new Cart block is awesome, kudos!
However, for products that don’t have variations, it shows text from the product description. Can that be removed via CSS?
From what I understand, you’re experiencing an issue where the Cart block is displaying text from the product description for products without variations. You’re wondering if this can be removed by using CSS.
To assist you better with this, could you please share the URL of your site with us? This will allow us to take a closer look and provide a more accurate solution for your query.
Looking forward to hearing from you soon.
Hi @bisratlearn
Correct, Cart block is displaying text from the product description for products without variations. I need help this to be removed via CSS.
My site is https://prnt.sc/XSJKUGeJxgIR – sorry I don’t want to provide text link
Thank you.
Hi @gkaralov
Correct, Cart block is displaying text from the product description for products without variations. I need help this to be removed via CSS.
My site is https://prnt.sc/XSJKUGeJxgIR – sorry I don’t want to provide text link
Thank you for providing the screenshot of your site. I understand your privacy concerns about sharing the actual URL. No worries, I’m here to help!
You can indeed use CSS to hide the product description. Here’s the CSS code you would need to add to your site:
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata {
display: none;
}Here’s how you can add this CSS to your website:
- Open your WordPress dashboard.
- Navigate to Appearance -> Customize -> Additional CSS.
- Copy and paste the CSS provided into the Additional CSS box.
- Hit the “Publish” button to save your changes.
This should hide the product description in the Cart block for all products. Please remember that changes made through CSS are theme-specific, so if you change your theme in the future, you’ll need to reapply these changes.
Give this a shot and let me know if it solves the issue. If you’re still having trouble, don’t hesitate to reach out. I’m here to help!
The CSS works like a charm! Thanks @bisratlearn
