The attachment tab for a product can be disabled in two different ways.
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 4: Click on the Quick Edit link to get an option for “Hide Attachment Tab.” From the drop-down, choose Yes to hide or 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 hovering over any product title, you will see an option for editing. Click the Edit link.
Step 4: 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.