Ecommerce Shopify WordPress Discussion

Custom Text on Cart and/or Checkout Page [duplicate]

This question already has an answer here: Add a custom text to WooCommerce cart items if the product has a specific shipping class (1 answer) Closed 7 days ago. Does anyone know how I can add custom text under every product in the cart page and checkout page? I don’t want that text showing on the individual product pages – only on cart/checkout pages. It will be the same for every product e.g. “Lead time can be up to 8 weeks” Thank you! I know code needs to be added into functions.php file but I have no idea what
Regarding requirement, mentioned in provided question, to add custom text "Lead time can be up to 8 weeks." for every product in woocommerce cart page, woocommerce checkout page, the following code can be put in theme functions.php file. If woocommerce template files are used for cart page, checkout page, then following code can be put. add_action('woocommerce_after_cart_item_name', 'custom_woocommerce_after_cart_item_name'); function custom_woocommerce_after_cart_item_name($cart_item) { echo '<br />Lead time can be up to 8 weeks.'; } add_filter('woocommerce_checkout_cart_item_quantity', 'custom_woocommerce_checkout_cart_item_quantity'); function custom_woocommerce_checkout_cart_item_quantity($cart_item_quantity) { $cart_item_quantity = $cart_item_quantity.'<br />Lead time can be up to 8 weeks.'; return $cart_item_quantity; } If woocommerce blocks are used for cart page, checkout page, then following code can be put. add_action('wp_footer', 'custom_wp_footer'); function custom_wp_footer() { if(is_cart()) { echo '<style type="text/css">.wc-block-cart-item__product .wc-block-components-product-price:after { content: "Lead time can be up to 8 weeks."; display: block; }</style>'; } else if(is_checkout()) { echo '<style type="text/css">.wc-block-components-order-summary-item__description .wc-block-components-product-price:after { content: "Lead time can be up to 8 weeks."; display: block; }</style>'; } } It can be checked, if this code works.

February 13, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.