• Resolved JediMax

    (@jedimax)


    Hi

    Is there a way to hide prices for each product when you click on the mini checkout? So you only have the total price. And the (QTY 1) that is next to them as well need to hide that too. I will need the code so each time I update the plugin I can add the code.
    I need this information step by step thanks I rather do it myself than give WP login to each plugin developer…

    https://postimg.cc/62cKGMQn

    • This topic was modified 2 years, 10 months ago by JediMax.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Iván Sosa

    (@ivansosa)

    Hello there,

    I’m sorry but this request has nothing to do with the support of this plugin.
    Please, contact the right plugin forum in order to receive help.

    Have a great day!

    Thread Starter JediMax

    (@jedimax)

    Thank you this is done now

    add_filter( 'woocommerce_cart_item_price', function ( $price, $item, $item_key ) {
    if ( isset( WC()->cart->cart_contents[$item_key]['wooco_parent_key'] ) ) {
    $parent_key = WC()->cart->cart_contents[$item_key]['wooco_parent_key'];
    
    if ( isset( WC()->cart->cart_contents[$parent_key] ) || array_search( $parent_key, array_column( WC()->cart->cart_contents, 'wooco_key', 'key' ) ) ) {
    return '';
    }
    }
    
    return $price;
    }, 999, 3 );
    
    add_filter( 'woocommerce_cart_item_subtotal', function ( $price, $item, $item_key ) {
    if ( isset( WC()->cart->cart_contents[$item_key]['wooco_parent_key'] ) ) {
    $parent_key = WC()->cart->cart_contents[$item_key]['wooco_parent_key'];
    
    if ( isset( WC()->cart->cart_contents[$parent_key] ) || array_search( $parent_key, array_column( WC()->cart->cart_contents, 'wooco_key', 'key' ) ) ) {
    return '';
    }
    }
    
    return $price;
    }, 999, 3 );
    
    add_filter( 'woocommerce_cart_item_quantity', function ( $price, $item_key, $item ) {
    if ( isset( WC()->cart->cart_contents[$item_key]['wooco_parent_key'] ) ) {
    $parent_key = WC()->cart->cart_contents[$item_key]['wooco_parent_key'];
    
    if ( isset( WC()->cart->cart_contents[$parent_key] ) || array_search( $parent_key, array_column( WC()->cart->cart_contents, 'wooco_key', 'key' ) ) ) {
    return '';
    }
    }
    
    return $price;
    }, 999, 3 );

    just amazing what Fiverr can do for you at $5

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a way to hide prices? And only show total price’ is closed to new replies.