removeProductMediaFromChoices( )


Removes media items from all or some of a product's choices. (Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).)

Permissions
Manage Stores - all permissions
Manage Products
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

Product ID from whose choices to remove media items.


mediaArray<MediaAssignmentToChoice>Required

Media to remove from choices. If an empty array is passed, all media will be removed from all choices for the given product.

Was this helpful?
Yes
No