I saw This link and I want to do the same thing in magento 2. I want to associate all products to some list of websites.


I think I found the solution there is a method in Magento\Catalog\Model\Product named updateWebsites($productIds, $websiteIds, 'add');

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.