Skip to main content

You can use plugin

 <?php

namespace Test\Catalog\Plugin;

class Product
{
    public function afterGetName(\Magento\Catalog\Model\Product $subject, $result)
    {
        return 'Test ' . $result;
    }
}

namespace Test\Catalog\Plugin; class Product { public function afterGetName(\Magento\Catalog\Model\Product $subject, $result) { return 'Test '.$result; } }

You can use plugin

 <?php

namespace Test\Catalog\Plugin; class Product { public function afterGetName(\Magento\Catalog\Model\Product $subject, $result) { return 'Test '.$result; } }

You can use plugin

<?php

namespace Test\Catalog\Plugin;

class Product
{
    public function afterGetName(\Magento\Catalog\Model\Product $subject, $result)
    {
        return 'Test ' . $result;
    }
}
added 16 characters in body
Source Link

You can use plugin

 <?php

namespace Test\Catalog\Plugin; class Product { public function afterGetName(\Magento\Catalog\Model\Product $subject, $result) { return 'Test '.$result; } }

You can use plugin

<?php

namespace Test\Catalog\Plugin; class Product { public function afterGetName(\Magento\Catalog\Model\Product $subject, $result) { return 'Test '.$result; } }

You can use plugin

 <?php

namespace Test\Catalog\Plugin; class Product { public function afterGetName(\Magento\Catalog\Model\Product $subject, $result) { return 'Test '.$result; } }

Source Link

You can use plugin

<?php

namespace Test\Catalog\Plugin; class Product { public function afterGetName(\Magento\Catalog\Model\Product $subject, $result) { return 'Test '.$result; } }