Skip to content

How to check that my observer file was called from admin or frontend in magento 2?

I am using sales_order_save_after in Global scope. I am creating orders from admin programmatically( Order, Invoice and Shipment). Each and every time this event is calling.

I want to check and update the order increment id with the prefix value only from the front end order.

How can i check the observer calling from front end scope?