Although disabling add to cart button is not recommended and should be avoided because it may hurt your profit. However, in some particular situations, store owners put products on display without selling for specific reasons, and they need to disable this very important button. Hiding the Add to cart button in Magento 2 store can restrict the customers to add products to the cart.
The Purpose of Disabling the Add To Cart Button

There are several reasons for disabling the Add To Cart button. For example,
- Upcoming products: Disable add to cart button for upcoming items. You are working on some items or software. But you want to take advantage of SEO keywords and not yet actually provide the product. At that time, you can show the items but hide the add to cart button. By doing so, you can generate the hype and also restrict the customers to add them to the cart!
- Out-of-stock products: If you are selling items that are currently out of stock and users are seeking them, you can use the disabling add-to-cart solution. And also, you can help users to subscribe to that item for a notification when the product is the stock with further customization. Therefore, you won’t lose the conversion.
- Specific products: Hide add to cart button for specific products that are only sample products or need not be sold at the moment
- Reference or non-selling products: With the purpose of driving potential customers to target products, the admin wants to recommend other relevant products but not sell them. Users can view more details and compare the functions of the items before making purchasing decisions.
Show on the product listing:

Show on the Product Page:

Manually Disable Add to Cart Button with Code
The following solution will allow you to disable add to cart button in Magento 2 from the product page as well as the category page. The method is compatible with the latest Magento 2.4.4 version. So, you need to download the latest Magento version for this solution.
1. Create a di.xml file in Vendor\Module\etc and copy the below code
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<type name="Magento\Catalog\Model\Product">
<plugin name="hidebutton" type="Vendor\Module\Plugin\HideButton" sortOrder="10" disabled="false" />
</type>
</config>
2. Create a HideButton.php file in Vendor\Module\Plugin and copy the code below.
<?php
namespace Vendor\Module\Plugin;
use Magento\Catalog\Model\Product;
class HideButton
{
public function aroundIsSalable(Product $product,\Closure $result)
{
return 0;
}
}
3. Run PHP bin\magento cache: clean to clear cache and refresh the page.
Now, all the products filed under the associated category will display prices but add to cart button will keep disabled. This is combined with hiding the add-to-cart button from the catalog, the home page, the product detail page, and every other page where you might have enabled your shoppers to add to cart.
Note: If you want to hide add to cart button completely, you need to configure the Call for Price tab.
Conclusion
We go through this article with you, therefore we hope you know how to disable this button in Magento 2. It will help you control more effective your store with this method. You can free to make it appear or disappear up to your wish to be suitable for your business plan. Therefore, you can review our post whenever you want to make the add-to-cart button not show up until you wish. You can do it by yourself or hiring a Magento Website Development service to help you take care of all of this is also the best idea. Contact us to know more information.