I want you to imagine this, there is a button on the wooden walls for upgrading them to stone, it shows you the cost which would be the same as a regular stone wall, when you press the button you pay the stone, and the wooden walls are deleted and replaced with the blueprint for a stone wall, then you send workers to build the stone wall like you would any other stone wall. It simply is replacing the wooden wall with stone all.