Ibn Umar would not pray the Duha prayer except on two occasions. The first was the day he arrived in Makkah, for he used to arrive there in the forenoon, perform tawaf around the Kabah, and then pray two rakats behind the Maqam. The second was the day he visited the mosque of Quba, which he used to visit every Saturday. Whenever he entered the mosque, he disliked leaving it without praying inside.He used to relate that the Messenger of Allah ﷺ would visit it riding and walking.
حدثنا يعقوب بن إبراهيم هو الدورقي حدثنا ابن علية أخبرنا أيوب
أن ابن عمر رضي الله عنهما كان لا يصلي من الضحى إلا في يومين يوم يقدم بمكة فإنه كان يقدمها ضحى فيطوف بالبيت ثم يصلي ركعتين خلف المقام ويوم يأتي مسجد قباء فإنه كان يأتيه كل سبت فإذا دخل المسجد كره أن يخرج منه حتى يصلي فيه قال وكان يحدث أن رسول الله ﷺ كان يزوره راكبا وماشيا