WooCommerce: Add Shipping Notices on Checkout Page

A WooCommerce client wanted to show some text in the checkout page, and specifically “Please allow 5-10 business days for delivery after order processing.” so that customers are aware of how shipping works. This is a vital information you should disclose on every page of your ecommerce website, and of course on the checkout page too.

Show a Shipping Notice on the WooCommerce Checkout

PHP snippet: add text above Order Notes in the Shipping column of the checkout page:

/**
 * @snippet       Add Order Note @ Checkout Page - WooCommerce
 * @how-to        Get CustomizeWoo.com FREE
 * @sourcecode    https://businessbloomer.com/?p=358
 * @author        Rodolfo Melogli
 * @compatible    WC 3.5.1
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_action( 'woocommerce_after_order_notes', 'bbloomer_notice_shipping' );

function bbloomer_notice_shipping() {
echo '<p class="allow">Please allow 5-10 business days for delivery after order processing.</p>';
}

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (delete "?>" if you have it there). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7.3.

If you think this code saved you time & money, feel free to join 14,000+ WooCommerce Weekly subscribers for blog post updates or 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

75 thoughts on “WooCommerce: Add Shipping Notices on Checkout Page

  1. Thanks for posting this Rodolfo. It’s a big help putting this notice on our checkout page because of the transit delays caused by both the peak holiday shopping season and COVID-19 combined. Your code worked like a charm on the WC version 4.7.1.

    1. Great!

  2. Hi,

    just installed Wordfence which shows me following critical status on the Shipping notices.

    File appears to be malicious or unsafe: wp-content/themes/flatsome-child/functions.php:

    Details: This file appears to be installed or modified by a hacker to perform malicious activity. If you know about this file you can choose to ignore it to exclude it from future scans. The matched text in this file is: <?

    The issue type is: Suspicious:PHP/checkandincludeprepend.5948
    Description: Suspicious code often found infecting files

    What shall I do ?

    1. You have something else going on, my snippet is fine

  3. I recently found this website and I don’t have words to explain how helpful this is.
    I’m thankful for all the awesome content you have been sharing Rodolfo and wanted to let you know this is still working in WP Version 5.5.1

    I was also able to set this up for multisite, sien I didn’t want to show the notice in all of the sites.

    1. Wow!

  4. Thank you, Rodolfo, it is still working on WC4!

    Best regards.

    1. Great!

  5. It’s generating the output twice no matter the hook used. Why is that?

    1. Not sure Joel. To troubleshoot, disable all plugins but WooCommerce and also switch temporarily to “Twentyseventeen” theme (load the snippet there in functions.php) – does it work? If yes, you have a problem with your current theme or one of the plugins.

      Hope this helps!

      R

    2. I am getting same thing 2 outputs and in wrong place, inputting just after

      Your order

  6. Hi Rodolpho,

    Do you know how can we put a countdown in the add cart popup, cart page with message. I wanna still orders in the cart for only 10mins.

    Thank you.

    1. Hello Stan, thanks so much for your comment! Yes, this is possible – unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  7. Thanks again. Freaking love your snippets! Thanks

    1. Thanks a mill πŸ™‚

  8. how to make it in red and bold?

    1. Hey Arunas – thanks so much for your comment! Yes, this is possible with CSS – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

    2. Hi Arunas

      An example:

      add_action( 'woocommerce_before_checkout_billing_form', 'bbloomer_notice_shipping' );
         function bbloomer_notice_shipping() {
         echo '<p class="year-text-heading">Must be over 18 to order!</p>';
      }
      

      Notice the p class is now year-text-heading. This is CSS. To change it add some CSS. An example.

      The CSS:

      /* ---- Checkout Page -- */
      /* Text just above the first name field. */
      p.year-text-heading {
      	font-size: 12px;
      	color: red;
      }
      
  9. I am not seeing where to purachase / download this??? It would be nice if you had a big old button that said BUY or DOWNLOAD or GO HERE TO GET IT. I am new to WooCommerace and don’t know how to get this.

    1. Hey Mary, thanks for your comment πŸ™‚ You just need to copy the snippet on this page and place this in your child theme’s functions.php file – if you need more guidance, please take a look at this video tutorial: https://businessbloomer.com/woocommerce-customization-hangout/. Hope this helps!

  10. This code does not show in Checkout page of the WooCommerce SHopper theme that I am using.

    1. Hey there, thanks for your comment! Does the code work on a different (default) theme such as 2017?

  11. Hi Rodolfo, I use the free Vantage theme for wordpress and added the php snippet at the end of my functions.php file, but it’s displaying the comment under the order summary whereas I want it just after the “Ship to a different address”. How do I achieve this? It’s also duplicating my comment(displaying it twice). I only need it once. Why’s this happening?

    1. Oooh never mind. I figured it out. Your site is amazing!

    2. i have same problem, how did you solved it?

    3. I also have a duplicating note appearing under “Your Order” rather than just before order notes. Using Foodie Pro theme (with Genesis Connect for Woocommerce) with WordPress 4.9.4 and Woocommerce 3.3.1

    4. Hello, I have it twice too, how did you solve this issue?

    5. I too have the notice appearing twice, what is the solution to only make it appear once please?

      1. Thanks for your comment Luke! I’ve revised the snippet, take a look at the new version πŸ™‚

    6. thank you

  12. Hello Rodolfo,

    Great snippet the problem with mine is that the text would appear 3 times. Is there something I am missing?

    1. Hey Cedric, thanks to a previous comment I changed the function slightly, let me know if this works!

  13. Hi Rodolfo, you’re tips are AWESOME! I just stumbled on your site. I tried adding this snippet, but it was duplicating the note. I changed the hook so the note appeared before the shipping.

    function bbloomer_notice_shipping() {
    echo '<strong>Please allow 1 business day for order processing. Orders are not processed on weekends or holidays.</strong>';
    }
     
    add_action( 'woocommerce_review_order_before_shipping', 'bbloomer_notice_shipping' );
    
    

    On the user end it would appear as: Please allow 1 business day for order processing. Orders are not processed on weekends or holidays.Please allow 1 business day for order processing. Orders are not processed on weekends or holidays.

    1. Excellent stuff Albert πŸ™‚

      1. Hi Rodolfo. Great post!
        just wanted to tell you, like comment https://www.businessbloomer.com/woocommerce-add-shipping-notices-checkout-page/#comment-30367

        That when using this code on the checkout Before Order
        it prints it double, so the end user see the notice twice.

  14. Hi there rodolfo , would it be possible to add these notes to specific products?

  15. Hello Rodolfo,
    Thanks for the great tip!
    I tried this snippet on my test site which is running WooCommerce version 3.2.3 but did not work.
    I changed the code from ‘woocommerce_before_order_notes’ to ‘woocommerce_checkout_after_customer_details’ and added CSS code at the “Additional CSS” section from Apperance> Customize
    Do you have any idea why this doesn’t work?
    Thanks a lot for your reply.

    1. Never mind! It worked!
      Thanks a lot!!!

  16. This worked perfectly – client needed a note to appear during checkout and among various ways to do it, your way proved easiest and fastest. Cheers!

    1. Thank you Clay πŸ™‚

  17. Worked perfectly. Thanks so much!

    1. Thanks Samantha πŸ™‚

  18. Works with Woocommerce 3.1.0
    Great bit of code.
    Thank you

    1. Brilliant! Thanks Alec πŸ™‚

  19. Hey,

    Would it be possible to show it dependant on shipping method ID sellected?

    Thanks

    1. Til, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here on the blog. Thanks a lot for your understanding! ~R

  20. Hi,

    Is there an easy way to use this same code for the /cart/ page as well? Want to give a notice to people as soon as they view their cart.

    Thanks!

    1. Hey Craig, thanks for your comment! Of course, you can use a similar snippet and just change the “hook” -> here’s a list of available hooks you have on the Cart page: https://businessbloomer.com/woocommerce-visual-hook-guide-cart-page/

  21. Hi there,

    Just want to ask. The code should be put on functions.php?

    Thanks

    1. it worked thanks!

      1. Excellent, thanks for letting me know πŸ™‚

  22. IS there a way to only show the notice based on Country? If they are in Canada for instance I want to display a notice. Thanks!

    1. Hey Rob, thanks for your comment! Do you mean you want to show this based on “geolocation” (IP address) – or based on the selected shipping/billing country?

  23. Is it possible to put the text directly after the tickbox above? On my woocommerce there is text that says “Use a different shipping address” and then there is a tickbox (reverse to your image above). I’d like to put my comment straight after that tickbox (no line break). Is that possible?

    1. Hey Sarah, thanks for your comment. I recommend checking this out: https://businessbloomer.com/woocommerce-visual-hook-guide-checkout-page. It will possibly help you find a different/better position (hook). Let me know!

  24. The most recent WP update appears to have broken this code and it no longer works. Is there an update we can use for it?

    Thank You!

    1. Hello Courtney, thanks for your feedback. I’m afraid I tested this on WC 2.6.4 and WP 4.6.1 and it works perfectly – weird πŸ™‚ Can you try again?

    2. never mind figured out what was wrong sorry please delete my comments.

      Thank You again!

      1. Ah, that’s no problem at all. I’m happy you brought this up so I took a chance to verify it still works! Cheers πŸ™‚

  25. Dats osm snippet… What to use if i want to place the notes near flat shipping

    Only upon minimum purchase of 1800 shipping is free ( I want this to be added whenever they purchase less than 1800)

    1. Deepa, thanks for your comment! Can you show me a mock-up or screenshot to show exactly where you want to place the notice? Thank you πŸ™‚

  26. Wow! amazing tutorial.

    What about if I want to tell them that my shop can produce the product only 50 products / day and the delivery date will be next 15 days. if the total quantity of product order on that day is more than 50; the delivery date will be next 16 days. ( like 1-50 send next 15 days, 51-100 send next 16 days).

    Do you know the way to do this thing?

    Thank you very much
    Sohn

    1. Sohn, thanks so much for your feedback! Yes, this is possible – but unfortunately it’s pretty custom and I cannot provide this solution on the blog. If you would like to get a quote, please go here. Thank you! R

  27. Interesting, is it possible to have users confirm their shipping address before order completion?

    1. Hey Cecily, thanks for your query. Are you saying you would like to show a message when people click on “Pay” that say you must confirm your shipping address first?

  28. Gret post Rodolfo! Thank you

    Quick question: where do I add this? I can’t seem to fing the right file to add it to :/

    1. You should add this to your current theme’s functions.php. Let me know if it works for you!

  29. Thanks for you tutorial!

    What about If I want to add a text after country field?
    I was trying something like that… but it seems to be not right

    function notice_country() {
    echo ‘For the moment we are shipping only in Montreal. Sorry for the inconvenients.’;
    }

    add_action( ‘woocommerce_after_billing_country’, ‘notice_country’ );

    1. Eduardo, try using “woocommerce_before_checkout_shipping_form” instead of “woocommerce_after_billing_country” πŸ™‚

  30. Thank you so much for this code snippet!

    1. And thank you so much for your feedback! πŸ™‚

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published. Required fields are marked *