Magento 2 – How to Change Product Attribute Scope

magento2product-attributescope

My issue is simple :

  • We have a bunch of product attributes with wrong scopes

They are defined as Global and we want their scope should be Website.

How to handle this programmatically?

For example with the product attribute price

I know how to create an attribute with the scope that I want. But I don't know if and how to update an existing scope attribute.

Any ideas?

Related Topic