Friday 29 July 2022

Add custom text on product page.

 add_filter( 'woocommerce_cart_item_name', 'custom_text_cart_item_name', 10, 3 );

function custom_text_cart_item_name( $item_name, $cart_item, $cart_item_key ) {

        $item_name .= '<br /><div class="item-shipping-class">'Here is add some text'</div>';

    return $item_name;

}


No comments:

Post a Comment