Support » Plugin: Kadence WooCommerce Email Designer » Remove shipping column

  • Resolved Famish

    (@iclicknz)


    Hi There,

    How can I remove the shipping column from the email?

    I couldn’t find it in the template directory
    kadence-woocommerce-email-designer/templates/woo/emails/

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • hannah

    (@hannahritner)

    Hey,
    Which email type are you referencing?

    Hannah

    Thread Starter Famish

    (@iclicknz)

    Hey hannah,

    I need that column removed from all the emails which have got it.

    I think the “new account” & “password reset” emails are the only ones without the order details.

    Ta

    Plugin Author Ben Ritner – Kadence WP

    (@britner)

    Hey,
    Shipping column shows if the product is set up to be shipped. If you want to remove that then you can edit the woocommerce templates or hide with a filter.

    For example: https://github.com/woocommerce/woocommerce/blob/527a7261bd0ad1f4ba1d8eb2f82a96f53867b715/includes/class-wc-order.php#L1382

    Ben

    Thread Starter Famish

    (@iclicknz)

    Hi Ben,

    Thanks for your advice. This filter did the trick.

    /* remove shipping column from emails */
    add_filter( 'woocommerce_get_order_item_totals', 'customize_email_order_line_totals', 1000, 3 );
    function customize_email_order_line_totals( $total_rows, $order, $tax_display ){
        if( ! is_wc_endpoint_url() || ! is_admin() ) {
            unset($total_rows['shipping']);
        }
        return $total_rows;
    }

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove shipping column’ is closed to new replies.