Eliminating humming from switched audio jack
When you say speakers you mean &quot;amplifier + speakers&quot;. Regular speakers won't hum when disconnected.
You need to short the amplifier inputs to ground when you plug in the headphones. It looks as though that socket has auxiliary contacts 6/7 and 9/10 which may perform this function. (You forgot the datasheet link so I can't check.)
Try a continuity test between 6 and 7 while plugging the headphones in and out and the same with 9 and 10. You'll be hoping the contacts close with the headphones plugged in.