I have a URL - http://localhost/products/product-name/ and I want to use this URL to retrieve the title Product Name
This is out of loop, so the URL provided is all I have to work from. Product Name is obviously the name of the term, which has the URL http://localhost/products/product-name/ I just need it so I can print it out on a particular place on the website.
The url above denotes the taxonomy as products but this is a rewrite of product_type - I'm not sure if this'll affect the solution.