Former Chief Rabbi Kook According to His Disciple “the Nazir” Reveals-Parts of the Zohar Were Written Via “Soul Revelation”
The Mishna Brura ruled, siman 25 comment 42: “the Knesset Hagdola wrote as a principle of the Poskim that whenever the Kabbalists and the Zohar argue against the Gemara and the Poskim, go after the Gemara and the Poskim“, {end of quote}.
Rabbi Aryeh Kaplan in his book Handbook of Jewish Thought 13:47 explained that because the Kabbala emanates primarily from Divine Inspiration one does not have the obligation to obey the customs of the
Kabbala. And if so, that most of the Kabbala is Divine Inspiration [or less than this], there is a principle, Lo Bashamayim Hi, namely that halachic matters are not to determined by heaven [as explained in Bava Metzia 59b] and we do not accept the decisions of a Bot Kol [a type of Divine Inspiration] in opposition to the conclusion of the Sages of the revealed Torah {Nigla}.
In an article that I saw on the internet http://2905.hydepark.co.il/topic.asp?topic_id=981194, arguments [in Hebrew] are brought that further weaken the authority of the Zohar, etc. against the halacha.Sefer Yochasin of MHR”A Zechut in the name of R”Y Dmin Acco the student of Ramban brought firsthand testimony that the book of the Zohar was written by means of one of the secret names of G-d {Shaim Hamiforash} and is not the work of Rabbi Shimon Bar Yochai. We are dealing with a witness who saw firsthand!
Rabbi Yaacov Emdeen in his book Mitpachat Sofrim brings many proofs to contradict the claim of the antiquity of the Zohar beyond all doubt and so too did he write in his comments to Sefer Yochasin, see there.
Furthermore I recommend that you listen to the lecture in English of Rabbi Alan Brill of Yeshiva University to understand some of the background behind the Kabbala in general.
http://www.yutorah.org/showShiur.cfm/712013/Rabbi_Alan_Brill/Introduction_to_the_Kabbalah_01
and perhaps also his second lecture
http://www.yutorah.org/showShiur.cfm/712417/Rabbi_Alan_Brill/Introduction_to_the_Kabbalah_02I bring all this just to strengthen the notion that one should not determine halacha based on the Kabbala when it opposes the masters of the revealed Torah {Nigla}.