Amp loud buzzing issue

So my guitar amp is a fender mustang LT twenty five and there seems to be a super loud buzzing issue when plugging to the extension cord. However, when plugging directly to the wall, the buzzing issues stop. I suspect it is because of the lack of power being distributed to the amp. The problem is how do i use my pedals powered by the power supply that is plugged in to the extension cord which is plugged to the wall without having 5o suffer from the loud amp noise