Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a new stock status called "Discontinued" #10080
What would be the benefit of further complicating stock status vs just adding some content to the product page or title?
I'd also question the SEO benefit of listing no-longer available products. If I went to a store looking for something and was not able to buy it/discontinued, I wouldn't be too pleased :)
I would rather have a product show "discontinued", than going to a bookmarked product and getting a 404 or being redirecting to something I was not interested in.
There are cases where products may have technical documents or firmware / software relating to the product attached and will be discontinued.
Setting the product to "out of stock" will give customers a false hope that the the product may become available again. Having a "discontinued" status here will take any hope of the product coming back "in stock" away.
In cases like this you would not want to modify the title and/or slug, as customers may have bookmarked the page to refer to later for updates etc.
Looking at it now I may have jumped the gun on submitting the pull request, as there is room for improvement on adding a discontinued status.
eg. Hide out of stock items from the catalog would hide the discontinued products currently due to is_in_stock returning false.
@claudiosmweb Understandable, the changes were made in a rush and looking over it again it would need a lot of refactoring.
I think adding a few new hooks would be better in the long run to allow for adding custom stock statuses, will close this pull request and implement custom status hooks instead.