Not changing to out-of-stock for me. What am I missing?
-
On a product with 2 variations, yesterday I set “Action date-time” field to very early this morning. Everything saved. I expected to see those variations out of stock today. What am I missing please? Is there another setting that also needs to be set at the same time?
-
Hey, all the other entries in this thread went away. That’s not cool.
Anyway, I had an idea: How do you define this plugin as “working”? I see that for an auto-expired item, the Add to cart button has been disabled. But when you say this plugin sets products to Out of Stock, I am looking at the product in WordPress admin expecting to see the variations’ “Stock Status” change to Out of Stock. (and when all variations are out of stock, the product itself should change to out of stock) Does your plugin not do this? If not, your description is very misleading. Disabling a button is very different from setting it to out of stock. Since the stock status is a core part of Woocommerce, when you say you’ll change it to out of stock, people assume that you are talking about changing the Stock Status that is part of Woocommerce core.
About thread entries: all entries are still here, only auto applied paging as it’s default ( like page 1,2. .). Please check at bottom, you’ll get all pages( discussions ).
I think I have to provide you recorded screen short video, so you can understand better that how this plugin is working and may be helpful to you.
Here is the link : https://jumpshare.com/s/mdrtfnP4ZbxJqXJx4B8B
Link will be auto removed after 24hrs.
Thanks for the video. So does the plugin not work unless Manage Stock and Stock Quantity are enabled? We don’t use those because what we are selling is admission to online webinars. They don’t “run out” or have a quantity, but we want the field “Stock status” to change from “In stock” to “Out of stock” at the specified time. (when the event ends) This is important because there are other important actions that get triggered when the product variation is set to “Out of Stock” (not stock quantity = 0, or hiding/disabling the purchase button). “Stock status” has to be set to “Out of Stock”. This is what we were looking to be able to schedule with your plugin. Is that possible? (The description on https://wordpress.org/plugins/variation-auto-expire-for-woocommerce/ makes one think that it is possible, but I can’t get it to work. Can you show me an example like what I describe?)
My demo was with manage stock is enabled. Yes obviously this is working with stock status also( without specified stock qty) like after specific date time it will be non-purchable and it’s status will be auto to “out of stock”. I think I have to also provide demo without manage stock qty! What do you think?
Yes, please provide a demo without manage stock qty, so I can see that Stock Status gets set to Out of Stock, since that’s what is not working for me.
Like in the image https://woocommerce.com/wp-content/uploads/2025/03/woocommerce-variable-product-downloadable.png, I need for “Stock Status” to change to “Out of Stock”. (Ignore the red markup on the image)
Here is without manage stock: https://jumpshare.com/s/QxbniDi2PsIEKVjRR26F
OK, I’ve been testing and I see what is happening: The plugin will not make the product out of stock until the product page is reloaded. I need the change of stock status to be triggered regardless of whether anyone visits the product page or not. You see, we have other code which populates a page’s content with all products that are in stock. So we want a product to really go out of stock and stop appearing there at the specified time. We don’t want someone to have to click on the product page first.
For this to work as we need it to, I should be able to keep refreshing /wp-admin/edit.php?post_type=product, and see the product switch to Out of stock after the set time passes. It will not do that, even 5 minutes after. But if I reload the product page, and then reload /wp-admin/edit.php?post_type=product again, then the product is out of stock.
That’s not going to work for us. Can you make your change-of-status code run at the specified action time?
Yes, that’s exactly what’s happening. I tested the idea on the real dev site now – the one that has over 50 plugins installed. And it works just like i said above – only changes after clicking/reloading the product page.
Yes, exactly — the expiry is checked on access. Using cron isn’t practical here, since it would need to run every second to avoid incorrect sales, which would overload the system when there are many products. So the current method ensures expiry is checked at the right time.
I’m closing this thread for now. If you have further questions, please feel free to start a new thread.
You must be logged in to reply to this topic.