Fixes #6979 by fetching attribute slugs instead of names.
Merge pull request #6980 from tc33/master

Returns attribute slugs when linking all variations, closes #6979