When Britain and France declared war on Germany, did this change Germany's plan? How did the plan change?
As early as 1934 after Hitler fully consolidated power and created the position of Führer, he held a secret meeting with the military leadership to explain his mission for Germany. War with the West was inevitable, but Germany's goal was to first secure Lebensraum in the east so it had a colonial empire large enough to rival their archnemesis the French.
Early 1938, Hitler and his Generals meet again to go over numerous military plans incase their Anschluss of Austria is opposed. Case Red is first conceptualized here for how to deal with France.
Late 1938, after the Munich Agreement, Hitler and Mussolini discuss how the time was soon for a clash with the West, and that they were weak due to their capitulation on Czechoslovakia. However, Mussolini understood this conflict as still being years away.
From what most historians see as well, Hitler did not think France and GB would honor their alliance to Poland as he built up for an incident over Danzig, after all they reneged twice before already. Hitler wanted to deal with the East first, the existential crisis of Jewish Bolshevikism and Lebensraum. But he was always ready to fight the West if he had to to secure unrivaled domination of the East.
So the West finally standing up to Hitler came as a surprise, but he was already ready to fight them if he had to.