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.
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.
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"
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!
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.
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.
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.
@@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!
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
See this wpsimplehacks.com/customize-woocommerce-stock-status/#change-woocommerce-add-to-cart-button-textfor-variable-products-if-product-is-avaliable-on-backorder
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
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.
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'] ) ) {
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 );
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
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.
Sorry, I haven’t tested it with this
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.
Woocommerce has a setting for this. Go to Woocommerce >> Settings >> Products >> Stock
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"
Sorry, can’t help you with that.
Thanks a lot for your all’s efforts
So nice of you
Amazing Hacks ! Keep up the good work 💪
Thanks! Will do!
Thanks for tips. How I can change position. I need stock status before title.
No, unfortunately you can't as it is hardcoded inside the woocommerce template.
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?
Sorry, unfortunately I can’t help you with that at the moment.
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!
Sorry, can’t help you with that
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.
Try to use this hook: woocommerce_after_cart_item_name
Is there a way to remove the in stock word on the in stock product but still show the out of stock when out of stock?
Sorry, can’t help you with this
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.
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.
@@wpsimplehacks using your custom stock label snippet, but yes I have Elementor. will have to try another solution. thank you for the quick reply.
@@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!
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
I tested it on a simple product and it works but not on variable product.
See this wpsimplehacks.com/customize-woocommerce-stock-status/#change-woocommerce-add-to-cart-button-textfor-variable-products-if-product-is-avaliable-on-backorder
@@wpsimplehacks thank you so much. You are always so helpful. I will test it out now.
Amazing tutorial👌 however the "read more" snippet seems to only change a few products not all. Any suggestions?
Do you have variable products with variations that are not out of stock?
When i add the code for the stock status it appears out of stock on the product page
Which code?
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
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.
Hi,
I may know what is the issue over there. Please replace "single_add_to_cart_button button alt" with "button alt"
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'] ) ) {
Sorry, can't help with that
What a great video!
ya it's video is too much helpfull
Glad you enjoyed it!
Fantastic Video
Thanks 🙂
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 );
I don’t know :)
Wonderful videos & easy explanations. Could you please assist? I can't seem to get my labels above placeholder box on the checkout page.
Usually it's a theme related issue. It would be wise to contact your theme supoort team about it.
@@wpsimplehacks thank you for reply. Having a blond moment, it was a build in feature on my builder. All sorted.
how i can hide cod option on specific products
See this video ruclips.net/video/-PI68HRpmdg/видео.html
Hi Sir, I need your help with something. Don't know how to contact you. Please help.
What is it you need my help with?
@@wpsimplehacks I want to move "You Save" element made with Code Snippet, alongside product price.
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
@@wpsimplehacks Ok, I am using Kadence theme btw