• Resolved vasudevb

    (@vasudevb)


    I have vendor name showing in mini cart and that is not being removed. How should I do that?

    I could remove Vendor name from Order confirmation and cart using this CSS
    .woocommerce td.product-name dl.variation .variation-Vendor {
    display: none;
    }

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @vasudevb ,

    You can use this code from below in your theme’s functions.php file to remove the vendor details from the cart

    
    // Remove the default Vendor name
    remove_filter( 'woocommerce_get_item_data', 'dokan_product_seller_info', 10 );
    

    Let me know if you need more assistance.

    Thank you ??

    Thread Starter vasudevb

    (@vasudevb)

    Thank you for responding. Will this remove from mini-cart? I have already removed it from order confirmation and cart.

    Don’t mind because I am asking again as you mentioned “cart” in your answer

    Hello @vasudevb ,

    I understand the concern. I will suggest to use both these lines to complete remove vendor details from the product data while it is showing on a cart or in the mini cart.

    remove_action( 'woocommerce_order_item_meta_start', 'dokan_attach_vendor_name', 10, 2 );
    remove_filter( 'woocommerce_get_item_data', 'dokan_product_seller_info', 10, 2 );

    I hope this works as expected.

    Let me know if you find any issues.

    Thank you ??

    Thread Starter vasudevb

    (@vasudevb)

    Hey thanks..

    I removed the CSS which i earlier used to hide vendor name from cart and checkout and your above code removed the vendor name from all places – checkout, cart and the mini cart

    Thanks

    (someone told me it is not a good practice to hide elements with CSS)

    Hello @vasudevb ,

    Yes, CSS is not the ultimate solution actually. It is always better to remove it with a hook if that is available.

    I am glad that the code helped you.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remoce vendor name from mini cart only’ is closed to new replies.