All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
The Prophetic narration which reads: "Seek knowledge even if it was in China.", is a weak narration and it is not authentic from the Prophet . This narration is reported by Al-Bayhaqi, Ibn 'Ady', and Ibn 'Abdul-Birr . Nonetheless, Al-Bayhaqi said: 'The context of the narration is well-known but its chain of narrators is weak.'
Furthermore, Al-Munaawi said: 'Ibn Hibbaan said that this narration is false and has no source.' Moreover, Ibn Al-Jawzi ruled that this is a fabricated narration. Besides, Ath-Thahabi said: 'The chain of narrators of this narration is not authentic.' Finally, Al-Albaani said: 'This is a fabricated narration.'
To conclude, the ruling of the scholars of Prophetic narrations is almost the same that this narration is not authentic and should not be attributed to the Prophet .
Allaah Knows best.