If you go to WooCommerce > Settings > Products > Inventory and navigate to Stock display format, you’ll see three options: ![]() Instead of removing the out-of-stock products, you can also decide whether to show the stock of your products or not. Remember to save the changes to finalize the customization and that’s it! Bonus: Don’t show product stock add_filter( 'woocommerce_product_query_meta_query', 'shop_only_instock_products', 10, 2 ) įunction shop_only_instock_products( $meta_query, $query ) Simply add the following script to the functions.php file of your child theme and update the file. You can use the following function with the woocommerce_product_query_meta_query filter hook to hide out-of-stock products in your Shop archive pages. 2.1) How to Hide Out of Stock Products on the shop archive page Now, let’s see some examples to hide out-of-stock products in WooCommerce. You can simply paste the scripts we’ve listed below into this section. Then, click on the functions.php file on the right sidebar to open the Theme Functions file. To open this file, in your WordPress Admin Dashboard go to Appearance > Theme Editor. The scripts we’ll show you today should go in the functions.php file. ![]() Additionally, create a child theme or use one of these plugins to make sure that you don’t lose the changes the next time you update your theme. Before you startĪs we’ll edit some core files, we recommend you backup your site. In this tutorial, we’ll show you some scripts that you can add directly to your site to hide out-of-stock products. If you’re not familiar with hooks, we recommend you have a look at this guide to learn more about them and how to make the most of them. To hide out-of-stock products in WooCommerce programmatically, you will need to use filter hooks. 2) Hide Out of Stock WooCommerce Products Programmatically However, if you want more flexibility and would like to have the option to hide your out-of-stock products on specific pages, you will need to use a bit of code. If you want a simple solution and you want to hide the unavailable products on all those pages, this is an excellent alternative. Now, all your out of stock products will be automatically hidden on the following pages: There you will see an option called Out of Stock Visibility. In your WordPress dashboard, go to WooCommerce > Settings > Products > Inventory. The simplest way to hide your unavailable products is through the WooCommerce Settings. 1) Hide out of stock products from the WooCommerce Settings Let’s have a closer look at both methods. There are two main ways to hide out of stock products in WooCommerce: How to hide out of stock products in WooCommerce Let’s have a look at how you can do that in WooCommerce. So if you want to only display products currently available and ready to be shipped, temporarily hiding the unavailable items can be a good idea. This can be inconvenient for some users, especially if you sell products for limited periods of time or change your inventory frequently. Additionally, the option to purchase the out-of-stock product will be disabled on the product page. By default, in WooCommerce, if a product runs out of stock, your Shop page will display a Read more button instead of the classic Buy or Add to Cart button. In this guide, we’ll focus on how to hide the products that aren’t available. Remove the Add-to-cart button so customers can’t buy the productĮach of these options has pros and cons.Display the product hiding the price and add a “notify me” button that users can select to receive a push notification when the product is available again.Hide the product price and stock from Google searches and let shoppers come to the product page even if the product isn’t available.If you’re running an online business that sells physical products, some of your items will be sold out from time to time. Why hide out-of-stock products in WooCommerce? In this guide, you will learn different methods to hide out-of-stock products in WooCommerce. ![]() When you need a store display fixture right now, choose from our wide selection of ready-to-go, in-stock store displays.Looking for great ways to customize your WooCommerce product pages and improve user experience? Then you’ve come to the right place. You can trust that the expert engineers at EB Display have a variety of in-stock displays that are crafted to catch the attention of shoppers and entice them to buy! Our goal is to help your product reach customers. We know it’s not always possible to design and manufacture a custom display, so we’ve stocked our warehouse with several of the most popular and functional retail display styles. When this is the case, you should consider our in-stock store displays! Sometimes you don’t have time to start from scratch. Stor-Rite Retail & Store Display Fixtures
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |