This method only applies the url rewrite to store of id 1 when I checked url_rewrite
table.
Before I call the removeSuffix() method I also create 2 more store views in a method, but none of them are used for url rewrite.
public function removeSuffix()
{
$this->_appState->setAreaCode('adminhtml');
$config = $this->_configFactory->create();
$config->setDataByPath('catalog/seo/product_url_suffix', '');
$config->save();
$config = $this->_configFactory->create();
$config->setDataByPath('catalog/seo/category_url_suffix', '');
$config->save();
}
How do I get the url rewrite to apply to all stores in the script?