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.
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.
Alternatively, you can also display a custom delivery messages for WooCommerce backordered products helping you to inform in prior about delays in delivery.