Job help

When should I tell Walmart I’m pregnant..I’m an overnight stocker and don’t know if they may fire me?