The Overflow Blog
On our site, we're using custom stock statuses for our products. We use the below code to achieve that, and it works, but there are some issues on variable products, where it changes back to the default status.We want to use it on variable products, to display a main stock status for the whole product, but when we select our custom stock status, it will suddenly change it back to the standard stock status after some time.
Stack Overflow for Teams is a private, secure spot for you and
By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Here is my recent attempt. May be I'm calling the wrong function.To display a duplicated Stock status setting select field in Woocommerce Code goes in function.php file of your active child theme (active theme).
@NazrinNoorzan My answer code is made to work only with Woocommerce 3+… You didn't explicitly restricted your question to Woocommerce 2.6.x and mostly nobody uses outdated Woocommerce version 2.6.x. clip-woocommerce-stock-status-archive.1.0.0.zip Download Clip.
Stack Overflow works best with JavaScript enabled
All solutions I found will set the “sold” status as either “available on back order” or “in stock”.
But it changes from our custom stock status "bestillingsvare" to the "instock" status, and it does it randomly or when some of the variation is updated.I hope it will not change randomly. The Overflow Blog
Variation Stock Status In WooCommerce Product Variation Dropdown: Here i am using WooCommerce filter woocommerce_dropdown_variation_attribute_options_html to modify dropdown options value.
but I need it to be handled by Woocommerce like an “out of stock” product. We use the below code to achieve that, and it works, but there are some issues on variable products, where it changes back to the default status. Each row displays several details. But nothing happen. Go to: WooCommerce > Orders.
By using our site, you acknowledge that you have read and understand our
WooCommerce Stock Manager allows you manage stock for products and their variables from one screen. Thanks for contributing an answer to Stack Overflow!
When some one purchases the product, it changes while reducing the stock. I think it's because I'm using WC 2.6.4 .Sorry forgot to highlight that.Anyway I changed global $product_object to $product and set the value to $product->stock_status( 'edit' ), and this time the error is "Fatal error: Call to a member function stock_status() on array in..." .
The Overflow Blog
On our site, we're using custom stock statuses for our products. We use the below code to achieve that, and it works, but there are some issues on variable products, where it changes back to the default status.We want to use it on variable products, to display a main stock status for the whole product, but when we select our custom stock status, it will suddenly change it back to the standard stock status after some time.
Stack Overflow for Teams is a private, secure spot for you and
By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Here is my recent attempt. May be I'm calling the wrong function.To display a duplicated Stock status setting select field in Woocommerce Code goes in function.php file of your active child theme (active theme).
@NazrinNoorzan My answer code is made to work only with Woocommerce 3+… You didn't explicitly restricted your question to Woocommerce 2.6.x and mostly nobody uses outdated Woocommerce version 2.6.x. clip-woocommerce-stock-status-archive.1.0.0.zip Download Clip.
Stack Overflow works best with JavaScript enabled
All solutions I found will set the “sold” status as either “available on back order” or “in stock”.
But it changes from our custom stock status "bestillingsvare" to the "instock" status, and it does it randomly or when some of the variation is updated.I hope it will not change randomly. The Overflow Blog
I will try to add later a version code for Woocommerce 2.6.x …yeah my bad. Featured on Meta
For … php : Stock management must be enabled for the stock status to appear. By using our site, you acknowledge that you have read and understand our
your coworkers to find and share information. Free 30 Day Trial