This is my php file
public function getget(){
$orderId = $this->getOrderId();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($orderId);
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
$methodTitle = $method->getTitle();
return $methodTitle;
}
I need to get selected payment method by user but this shows payment method from order. I'm beginner.