Skip to content

Using object manager

I’ve question in the link below :
Get grand total and customer data variables

Now I solved the issue by using object manager directly, but I found too many people said it’s not recommended !

Could you please tell me why ? also is there another way to use ?