Home Forums WoodMart support forum Problem with the Woocommerce hook ‘wtwh_print_cart_weight’

Problem with the Woocommerce hook ‘wtwh_print_cart_weight’

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #617892

    szymon-0481
    Participant

    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.
    #618298

    Artem Temos
    Keymaster

    Hello,

    We would be happy to help but we don’t know exactly how this code is supposed to work and fixing additional codes like this are out of our theme support scope.

    Kind Regards

    #618720

    szymon-0481
    Participant

    Ok, understood.
    Thanks,
    Please close this topic.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Problem with the Woocommerce hook ‘wtwh_print_cart_weight’’ is closed to new replies.