I have a multi-store setup with Magento 2.1.7 CE on the domain a, domain b, domain c. I want to apply images to some products programmatically. When I make an API call on any domain with the "all" path:
index.php/rest/**all**/V1/my/apply/images. instead of
The store is 0 - that's what I want. The api calls a helper method in this case.
But I do not want to call the REST API but do this by CLI to avoid timeouts. So I wrote a command and this is calling the same helper method as the REST API call does. So I wonder how to set the store. It's running the default store only.
storeManager->setCurrentStore(0) before calling the helper method doesn't have any effects.
Do you have any suggestions?