They hired an American to go over there and train them.
That's only a partial answer; in many situations, they also moved the manufacturing equipment. As a result, the problem with finding companies that build things in the US is not just about training, it is about having the equipment that can be used to build things.
This is one way that the administration can incentive companies to bring manufacturing back to the US: don't charge taxes on repatriated money that is used to set up new manufacturing facilities in the US. I would also couple this with a parallel effort to charge tariffs on manufactured goods imported into the US: a carrot and stick approach.
As big companies start to re-establish manufacturing in the US, smaller suppliers will spring up to support their efforts. Walmart can't do this on their own.