How can I change the attribute of a product in catalog_product_save_after
event.
I am getting the product object. I set data in a particular attribute and set $product->save()
.
This stops everything, admin page doesn't open at all.
I have to fire service php-fpm restart.
Best Answer
If you want to
$productobj
after saving product from backend then you can easily usecatalog_product_save_after
event.Put this
events.xml
in below pathAnd put your
Productsaveafter.php
in below path