Hi,
I have implemented this function through Code Snippets:
add_action( ‘woocommerce_before_checkout_form’, ‘wtwh_print_cart_weight’ );
add_action( ‘woocommerce_before_cart’, ‘wtwh_print_cart_weight’ );
function wtwh_print_cart_weight() {
$notice = ‘Waga zamówienia: ‘ . WC()->cart->get_cart_contents_weight() . ‘ ‘ . get_option( ‘woocommerce_weight_unit’ );
if ( is_cart() ) {
wc_print_notice( $notice, ‘notice’ );
} else {
wc_add_notice( $notice, ‘notice’ );
}
}
It should output a frontend information about overall order weight.
It works fine on the default WordPress Cart/Checkout pages (1st screenshot)
Yet, it doesn’t work with Woodmart Layout Cart/Checkout pages (2nd screenshot).
Is there anything I have to customize in this code to make it work on your custom layout pages?
Can you help me with this one?
Thanks
Greetings
Attachments:
You must be
logged in to view attached files.