For testing purpose, I'm writing my code in the following file.
app/design/frontend/Joemerino/base/Magento_Swatches/templates/product/layered/renderer.phtml
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$filterableAttributes = $objectManager->create('Magento\Catalog\Model\Layer\Resolver');
$layer = $filterableAttributes->get();
$activeFilters = $layer->getState()->getFilters();
echo "<pre>";
print_r($activeFilters);
echo "</pre>";
?>
But it's empty even if two filters applied.
Best Answer
Please try the below code its working for me:
Below code will return the filters which are already applied to the category page or seach result page by customer, In magento you can say State