I've had a plugin working on 2.2.2 version but it's not working on 2.3.4. Its seem that collectSitemapItems()
method is not firing even in native magento WHen I print_r('Die');die;
public function collectSitemapItems()
{
print_r('Not firing');die;
/** @var $helper \Magento\Sitemap\Helper\Data */
...
But it's printing under protected method _initSitemapItems()
/**
* Initialize sitemap
*
* @return void
*/
protected function _initSitemapItems()
{
print_r('Working Here');die;
...
My plugin have afterCollectSitemapItems()
Method:
public function afterCollectSitemapItems(
Sitemap $subject
)
{
print_r('Not firing here either');die;
My Plugin di.xml:
<type name="Magento\Sitemap\Model\Sitemap">
<plugin name="vendor-sitemap" sortOrder="1" disabled="false" type="Vendor\Module\Plugin\Sitemap\Plugin"/>
</type>
Any ideas why this isn't working anymore?