I'm trying to override the round
method in \vendor\magento\module-directory\Model\PriceCurrency.php
. This is the method:
/**
* @inheritdoc
*/
public function round($price)
{
return round($price, 2);
}
And this is the code I have in a plugin to override the above method:
class PriceCurrency
{
public function aroundRound(\Magento\Directory\Model\PriceCurrency $subject, callable $proceed, $price) {
return round($price, 4);
}
}
My code doesn't work. I can easily override other public methods in the PriceCurrency
file! Can that method be overridden?