There are two ways to disable the attachment tab for a product.
Using Quick Edit Method
Step 01: Log in to the WordPress admin panel.
Step 02: Navigate to Products > All Products.
Step 03: Now hover on any product titles, and you will get an option for Quick Edit.
Step 04: Click on the Quick Edit link to get an option for “Hide Attachment Tab?” From the drop-down, choose Yes to hide/disable the attachment tab from the product page. Finally, click the update button to save your settings.
Step 05: After the successful update, you will see the updated status in the Hide Attachment Tab column.
Using Custom Meta Box Method
Step 01: Log in to the WordPress admin panel.
Step 02: Navigate to Products > All Products.
Step 03: On mouse hover to any product title, you will get an option for Edit. Click the Edit link.
Step 04: Next, you will get a custom meta box titled Attachment Tab Display Settings.
Step 05: From the “Hide Attachment Tab?” drop-down select Yes.
Step 06: Finally, click the Update button to save your settings.