I want to create an order(programmatically) for a product that is disabled in Magento 2.3.4-p2 from the admin section.
I am getting the following error:
Product that you are trying to add is not available.
Can anyone help me? How can I place an order for the disabled product?
Thanks in advance.
for a disabled product, you can not able to do that.
But you may change product visibility nonvisible and enable product so it will work for you
Hi @Sunil Patel
Thanks for your reply. I understand that default Magento does not allow to place order of disabled product. But is there any hook or any customisation through which we can place order for disabled product.