How to Customize Woocommerce Stock Status? (17 hacks)

Sdílet
Vložit
  • čas přidán 17. 07. 2022
  • Let’s take a look at how to customize Woocommerce stock status without any fancy plugin.
    All snippets shown in the video are here: wpsimplehacks.com/customize-w...
    WPCodeBox with 20% discount: wpsimplehacks.com/wpcodebox (SAVE 20% Coupon WPSH20)
    Blocksy and Kadence are currently two of the best WordPress themes. So, if you’re interested, then you can grab:
    🅱️ Blocksy theme wpsimplehacks.com/blocksy (SAVE 10% Coupon WPSH10)
    🔵 Kadence theme here: wpsimplehacks.com/kadence (SAVE 10% Coupon SIMPLEHACKS)
    ✅ If you want to be the first to be notified about the new tutorials then please subscribe to this channel. / @wpsimplehacks
    ✅ BEST WORDPRESS THEMES:
    Blocksy theme: wpsimplehacks.com/blocksy (SAVE 10% Coupon WPSH10)
    Kadence Theme: wpsimplehacks.com/kadence (SAVE 10% Coupon SIMPLEHACKS)
    Astra Theme: wpsimplehacks.com/astra
    GeneratePress: wpsimplehacks.com/generatepress
    OceanWP: wpsimplehacks.com/oceanwp (SAVE 10% Coupon WPSH10)
    ✅ MY FAVOURITE WEBHOSTING PROVIDERS:
    Verpex Hosting wpsimplehacks.com/verpex (SAVE 22% Coupon WPSH22)
    A2 hosting wpsimplehacks.com/a2-hosting
    ✅ AWESOME WORDPRESS PLUGINS:
    WPCodeBox wpsimplehacks.com/wpcodebox (SAVE 20% Coupon WPSH20)
    WooLentor Elementor/Gutenberg add-on wpsimplehacks.com/woolentor (SAVE 20% Coupon WPSH20)
    Best Wordpress Backup, Migration and Staging plugin - WpVivid Pro wpsimplehacks.com/wpvidid (SAVE 20% Coupon WPSH20)
    Best Gutenberg Blocks addon - Kadence Blocks wpsimplehacks.com/kadenceblocks (SAVE 10% Coupon SIMPLEHACKS)
    Best forms plugin - Fluent Forms: wpsimplehacks.com/fluentforms (SAVE 20% Coupon: WPSH20)
    WP Social Ninja wpsimplehacks.com/socialninja (SAVE 20% Coupon: WPSH20)
    Best for email marketing - Fluent CRM: wpsimplehacks.com/fluentcrm (SAVE 20% Coupon: WPSH20)
    Best for creating tables - Ninja Tables wpsimplehacks.com/ninjatables (SAVE 20% Coupon: WPSH20)
    Best events calendar and ticket selling plugin - WP Eventin wpsimplehacks.com/wp-eventin (SAVE 20% Coupon: WPSH20)
    Best Wordpress LMS - Tutor LMS wpsimplehacks.com/tutorlms (SAVE 20% Coupon thmwelcome20)
    Best Wordpress SEO plugin - SEOPress wpsimplehacks.com/seopress
    Image Map Pro - wpsimplehacks.com/imagemap
    ✅ AWESOME WOOOCOMMERCE EXTENSIONS:
    Best Woocommerce Swiss Knife tool - Kadence WooExtras wpsimplehacks.com/wooextras (SAVE 10% Coupon SIMPLEHACKS)
    Advanced Dynamic Pricing Pro wpsimplehacks.com/dynamic-pri... (SAVE 20% Coupon: WPSH20)
    Phone orders For Woocommerce Pro wpsimplehacks.com/phone-order... (SAVE 20% coupon: WPSH20)
    Advanced Orders Export Pro wpsimplehacks.com/export-orde... (SAVE 20% coupon: WPSH20)
    Best Woocommerce sidecart plugin - Woocommerce Cart in One wpsimplehacks.com/cartinone
  • Jak na to + styl

Komentáře • 50

  • @andersonward8064
    @andersonward8064 Před 2 lety

    Thanks a lot for your all’s efforts

  • @antonisfio
    @antonisfio Před rokem

    Amazing Hacks ! Keep up the good work 💪

  • @xnwebdesign1024
    @xnwebdesign1024 Před 2 lety

    Fantastic Video

  • @SeanClarke
    @SeanClarke Před 2 lety +1

    What a great video!

  • @pixelgap
    @pixelgap Před rokem

    Hello. Thank you for this amazing tutorial. I have a question please. Is there a way to show "Available on backorder" text on just below the product name on cart, checkout pages and emails? I would really appreciate any help.

    • @wpsimplehacks
      @wpsimplehacks  Před rokem

      Try to use this hook: woocommerce_after_cart_item_name

  • @joem7155
    @joem7155 Před rokem

    Thank you so much for the great video.
    Wondeirng if you have any snippets or advise on how to change the Allow backrders text for "Allow, but notify customer" when stock management is used with simple or variable products. Looking for something other than the default "can be back ordered" text woocommerce used and possibly configurable per product page simular to the snippet for "How to display Woocommerce backorder text value from custom field"

  • @paulsid2048
    @paulsid2048 Před 2 měsíci

    Awesome work as always, how can the stock status code be updated to allow for variable products as well please, as have a number of products that have a few colour variations.

  • @makc1
    @makc1 Před rokem

    Hi Yanek! Thanks for another great tutorial!
    Is there any Snippet you have changing Woo default behaviour - Set the backorder status when the stock qty is less than 1? By default it goes to "Out of Stock" but I am trying to make it change to "Backorder"?
    Thanks for advance!

  • @rebeccalinde5754
    @rebeccalinde5754 Před rokem

    These are great. What I can't seem to figure out/find a snippet for is how to change the "XX in stock" text for a variable product. Any ideas?

    • @wpsimplehacks
      @wpsimplehacks  Před rokem

      Sorry, unfortunately I can’t help you with that at the moment.

  • @michaelakubas
    @michaelakubas Před 2 lety

    Thanks for tips. How I can change position. I need stock status before title.

    • @wpsimplehacks
      @wpsimplehacks  Před 2 lety

      No, unfortunately you can't as it is hardcoded inside the woocommerce template.

  • @ClintonLee83
    @ClintonLee83 Před rokem

    This is fantastic! Great video.
    I've created a custom status --> custom_order - I can't get the notice to show up on the cart page, eg: "Youve got a custom order product in your cart."
    will this line still work if I haven't defined is_custom_order?
    if( $cart_item['data']->is_custom_order( $cart_item['quantity'] ) ) {

  • @souravsaha6511
    @souravsaha6511 Před 2 lety

    first of all thanks a lot for this amazing video but when i tried submitting a form on single product page using Contact form 7 , it doesn't show the confirmation of form submission , instead it loads the page and shows i can not add the product as it is out of stock . please help

    • @wpsimplehacks
      @wpsimplehacks  Před 2 lety +1

      Sorry, but unfortunately I’m not familiar with Contact Form 7 plugin. My snippet disables the add to cart button for out of stock products and adds a contact form isntead of it.
      Just to test it out, try with some other contact form plugin (Fluent forms, for example). If the other form works, then there’s an issue with the CF7.

    • @wpsimplehacks
      @wpsimplehacks  Před 2 lety

      Hi,
      I may know what is the issue over there. Please replace "single_add_to_cart_button button alt" with "button alt"

  • @pixelgap
    @pixelgap Před rokem

    Hello. First of all thank you for all the amazing tutorials. The code for this How to change Woocommerce add to cart button text if product is avaliable on backorder does not work. Any idea why please. It used to work fine but now it doesn't. I deactivated all other snippets, switched theme and deactivated plugins but the issue is still there. The text does not change. Thank you

    • @pixelgap
      @pixelgap Před rokem

      I tested it on a simple product and it works but not on variable product.

    • @wpsimplehacks
      @wpsimplehacks  Před rokem +1

      See this wpsimplehacks.com/customize-woocommerce-stock-status/#change-woocommerce-add-to-cart-button-textfor-variable-products-if-product-is-avaliable-on-backorder

    • @pixelgap
      @pixelgap Před rokem

      @@wpsimplehacks thank you so much. You are always so helpful. I will test it out now.

  • @elizabeth_8791
    @elizabeth_8791 Před rokem

    Wonderful videos & easy explanations. Could you please assist? I can't seem to get my labels above placeholder box on the checkout page.

    • @wpsimplehacks
      @wpsimplehacks  Před rokem +1

      Usually it's a theme related issue. It would be wise to contact your theme supoort team about it.

    • @elizabeth_8791
      @elizabeth_8791 Před rokem

      @@wpsimplehacks thank you for reply. Having a blond moment, it was a build in feature on my builder. All sorted.

  • @28692kabelo
    @28692kabelo Před 3 měsíci

    Amazing tutorial👌 however the "read more" snippet seems to only change a few products not all. Any suggestions?

    • @wpsimplehacks
      @wpsimplehacks  Před 3 měsíci

      Do you have variable products with variations that are not out of stock?

  • @kemmo
    @kemmo Před rokem

    By adding the following filter it is possible to display the stock status in exported product csv files?
    function add_custom_stock_csv_data( $_, $product ) { $status = $product->get_stock_status( 'edit' ); switch( $status ) { case 'pre_order': case 'contact_us': return $status; case 'onbackorder': return 'backorder'; case 'instock': return 1; default: return 0; } } add_filter( 'woocommerce_product_export_product_column_stock_status', 'add_custom_stock_csv_data', 10, 2 );

  • @steveh3690
    @steveh3690 Před rokem

    Hello! Im new to WP and have had a website built for me. Im just doing some finishing touches. This snipped did not work for me. My site seems to have a lot of plugins. Not sure why its not working. Its a very simple process. Any help would be greatly appreciated.

    • @wpsimplehacks
      @wpsimplehacks  Před rokem +1

      Since I don’t know what snippet you’re using it’s hard to tell. The most likely reason is that you’re using a page builder (Elementor, Divi, etc) or theme that overrides default Woocommerce hooks.

    • @steveh3690
      @steveh3690 Před rokem

      @@wpsimplehacks using your custom stock label snippet, but yes I have Elementor. will have to try another solution. thank you for the quick reply.

    • @steveh3690
      @steveh3690 Před rokem

      @@wpsimplehacks I got it to work by disabling "Track stock quantity for this product". It almost works exactly how I want. But I dont want customers to be able to buy certain products. Is that possible? Thank you!

  • @Peebals
    @Peebals Před 2 lety

    how i can hide cod option on specific products

    • @wpsimplehacks
      @wpsimplehacks  Před 2 lety

      See this video czcams.com/video/-PI68HRpmdg/video.html

  • @anuragahreiki
    @anuragahreiki Před 5 měsíci

    Thank you, your code for How to change “XX in stock” text on Woocommerce single product pages is the only one that worked for me! How can I make it so that it only shows the number in stock when it's below the low stock threshold, not all the time. e.g. I only want it to show xx in stock if it is below 3. It is not doing it even though I have chosen "Only show quantity remaining in stock when low" in Woo inventory settings. Appreciate the help.

    • @wpsimplehacks
      @wpsimplehacks  Před 5 měsíci +1

      Woocommerce has a setting for this. Go to Woocommerce >> Settings >> Products >> Stock

  • @jcnation5393
    @jcnation5393 Před 2 lety

    Hi Sir, I need your help with something. Don't know how to contact you. Please help.

    • @wpsimplehacks
      @wpsimplehacks  Před 2 lety

      What is it you need my help with?

    • @jcnation5393
      @jcnation5393 Před 2 lety

      @@wpsimplehacks I want to move "You Save" element made with Code Snippet, alongside product price.

    • @wpsimplehacks
      @wpsimplehacks  Před 2 lety

      You wouod need to use a correct hook location and some CSS to make it work. If you don't know how to use CSS then it would be wise to hire someone to do the job. Also, the CSS code to make it work may depend on your theme

    • @jcnation5393
      @jcnation5393 Před 2 lety

      @@wpsimplehacks Ok, I am using Kadence theme btw