Home > other >  How to customize the cart page in woocommerce
How to customize the cart page in woocommerce

Time:03-01

Hello on cart page below the products which are in our cart we have a heading of cart totals. Below cart totals we have three text heading subtotal shipping and total now what I want to do is I want to edit the text which comes in from of shipping option I just want to add this line "Please email us before placing an order to find out the exact shipping fees to your address." in shipping option before the original text. So how can I do it.

CodePudding user response:

You have to use the hook woocommerce_cart_totals_before_shipping.

For example:

add_action( 'woocommerce_cart_totals_before_shipping', 'your_shipping_text', 10 );
function your_shipping_text(){ 

    echo 'your text';
    
}

That snippets goes in the functions.php of your theme.

You can see the possible hooks and their locations in this Visual Hook Guide

  • Related