wc-cart-functions.php

function wc_cart_totals_shipping_method_label( $method ) {
$label = $method->label;

if ( $method->cost > 0 ) {
    if ( WC()->cart->tax_display_cart == 'excl' ) {
        $label .= ': ' . wc_price( $method->cost );
        if ( $method->get_shipping_tax() > 0 && WC()->cart->prices_include_tax ) {
            $label .= ' <small>' . WC()->countries->ex_tax_or_vat() . '</small>';
        }
    } else {
        $label .= ': ' . wc_price( $method->cost + $method->get_shipping_tax() );
        if ( $method->get_shipping_tax() > 0 && ! WC()->cart->prices_include_tax ) {
            $label .= ' <small>' . WC()->countries->inc_tax_or_vat() . '</small>';
        }
    }
} elseif ( $method->id !== 'free_shipping' ) {
    $label .= ' (' . __( 'Free', 'woocommerce' ) . ')';
}
return apply_filters( 'woocommerce_cart_shipping_method_full_label', $label, $method );

}

The function returns $label, $method and I want to show $method, $label

Change the order is not possible

I want to change the order of [ price - shipping method] since the system shows [ shipping method - price]

Currently, the CHECKOUT page looks like this:

        Cart Subtotal  $300.00
        Shipping  **Ship To An International Destination: $35.00** *CHANGE*
        Order Total $335.00

As I could change the CHECKOUT page to look like this;

       Cart Subtotal           $300.00
       Shipping and Handling   **$35.00 Ship To An International Destination** *CHANGE*
       Order Total             $335.00

Read more here: Woocommerce change default order [method - price] shipping en CART


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , , ,

Wordpress related questions and answers: