• Resolved CharlyIBC

    (@charlyibc)


    Trying to find what file I need to edit is like trying to find a needle in a haystack.

    In the Cart Totals on the cart page, I want to remove Add: that shows up before the $ amount. The S/H amount should line up with the other amounts and with Add: it looks off. I’ve searched dozens of woocommerce .php files and no joy.

    WooCommerce code page renders no help at finding this stupid little word I wish to remove. I know how to edit code, but first I need to find which file the Add: is in to remove it. Gosh it should not be this difficult.

    I would very much appreciate any assistance at which file to access!

    Using WC 2.2.8

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter CharlyIBC

    (@charlyibc)

    Well it took some time, but I finally found and tweaked what was needed to remove the shipping method label. Whew!

    Can’t say this will work for you, but here’s what I did:

    1. In your child theme functions.php file place this

    add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_label', 10, 2 );
    
    function remove_label($label, $method) {
    $new_label = preg_replace( '/^.+:/', '', $label );
    return $new_label;
    }

    If needed, add following to child custom.css

    2. If your Cart Totals S/H amount doesn’t align properly (change px amount to work for you)

    .cart_totals table tbody tr.shipping span.amount {
        margin-left: 9px;
    }

    3. If your Checkout S/H amount doesn’t align properly (change px amount to work for you)

    div#order_review table.shop_table tfoot tr.shipping span.amount {
        margin-left: 9px;
    }

    Hello CharlyBC,

    I’ve been searching for this problem for quite sometime now, all the snippets that I added never worked.

    Is there a way to do that in WC 2.5?

    Thanks a lot!
    Regards,
    Hashim

    Thread Starter CharlyIBC

    (@charlyibc)

    Hi Hashim,

    I’m on my way to work sorry. Could you post a link to your page? Perhaps I can see what will work for you tomorrow morning, though no guaranty. It’s been quite awhile since I found this fix for me

    ~ Charly

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WooCommerce] Remove Add: after Shipping and Handling on cart page’ is closed to new replies.