Add custom source model
Error:
Execution failed (Unable to load attribute "google_product_category": unknown source type model `YourWebshop\App\Model\CustomSourceModel`)
Solution: Add a custom attribute source model:
$magentoSystemRepository->addCustomAttributeSourceModel('YourWebshop\App\Model\CustomSourceModel');
Optionally you can set the options by passing a Magento2AttributeOptionCollection as second parameter:
$options = new \Attlaz\Adapter\Magento2\Model\Magento2AttributeOptionCollection();$options->addAttributeOption(new \Attlaz\Adapter\Magento2\Model\Magento2AttributeOption(0, 'optionA'));$options->addAttributeOption(new \Attlaz\Adapter\Magento2\Model\Magento2AttributeOption(1, 'optionB'));$options->addAttributeOption(new \Attlaz\Adapter\Magento2\Model\Magento2AttributeOption(2, 'optionC'));$magentoSystemRepository->addCustomAttributeSourceModel('YourWebshop\App\Model\CustomSourceModel', $options);