Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
00 Days
00 Hours
00 Minutes
00 Seconds

How to Display a Custom Message for Downloadable Products in WooCommerce?

You can show custom shipping messages based on product types available in your store. Be it downloadable products or subscription services it is easy to display custom messages using these handy code snippets.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_action( 'woocommerce_before_single_product', 'ts_display_downloadable_product_notice' );
function ts_display_downloadable_product_notice() {
global $product;
// Check if the product is downloadable
if ( $product && $product->is_downloadable() ) {
// Display a custom notice for downloadable products
wc_add_notice( 'Your ebook will be emailed to you once the payment is confirmed. No physical shipping is required for this ebook.', 'notice' );
}
}
add_action( 'woocommerce_before_single_product', 'ts_display_downloadable_product_notice' ); function ts_display_downloadable_product_notice() { global $product; // Check if the product is downloadable if ( $product && $product->is_downloadable() ) { // Display a custom notice for downloadable products wc_add_notice( 'Your ebook will be emailed to you once the payment is confirmed. No physical shipping is required for this ebook.', 'notice' ); } }
add_action( 'woocommerce_before_single_product', 'ts_display_downloadable_product_notice' );

function ts_display_downloadable_product_notice() {
global $product;

// Check if the product is downloadable
if ( $product && $product->is_downloadable() ) {
// Display a custom notice for downloadable products
wc_add_notice( 'Your ebook will be emailed to you once the payment is confirmed. No physical shipping is required for this ebook.', 'notice' );
}
}

Output

The output shows that the custom message gets displayed when the downloadable product is added to the cart.

How to Display a Custom Message for Downloadable Products in WooCommerce? - Tyche Softwares

Alternatively, you can also display a custom delivery messages for WooCommerce backordered products helping you to inform in prior about delays in delivery.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of


0 Comments
Newest
Oldest
Inline Feedbacks
View all comments
reCaptcha Error: grecaptcha is not defined
0
Would love your thoughts, please comment.x
()
x
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible.

Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

By using our site, you acknowledge that you have read and understood our Privacy Policy and Terms & Conditions.