• Resolved romestylez

    (@romestylez)


    Hi there,
    im using the standard mail template but found a little problem. In the row with the shipping cost i have an additional text “via shipping” i attached a screenshot.

    Where can i delete this additional text ?

    https://imgur.com/a/ZaKltPQ

Viewing 7 replies - 1 through 7 (of 7 total)
  • braehler

    (@braehler)

    @romestylez

    I′m pretty sure this in the translation file. Check out the .po file

    Thread Starter romestylez

    (@romestylez)

    Nah its german just translated it for here to english. I want to delete that ?via shipping“ just want the price.

    braehler

    (@braehler)

    @romestylez
    try this filter here, should only return the price not the label

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

    (@romestylez)

    Sadly this had no impact and the label is still in the mail. This code will delete the label in the shopping cart but not in the mail.

    • This reply was modified 5 years ago by romestylez.
    • This reply was modified 5 years ago by romestylez.
    Thread Starter romestylez

    (@romestylez)

    No one got an idea ?

    HelgaTheViking

    (@helgatheviking)

    It appears to be coming from here and there’s a filter, so you can try the following snippet:

    
    add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_null' );
    

    Though it’s goal is to show the name of the shipping method…. if yours is saying “Shipped via: Shipping” then I have to wonder about the naming of your shipping method.

    Thread Starter romestylez

    (@romestylez)

    That code did it !

    Year i just named it “shipping” or “test” when adding shipping costs to a manual added order as i know no one will see this ??

    Thank you anyways your code helped me and is working perfectly !

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Mail template – Customer completed order’ is closed to new replies.