Whether your lender will approve a product transfer with a bad credit history depends on their policies.
This varies depending on how severe the credit issues were, and when they happened.
If you have been rejected for a mortgage transfer based on credit scoring, you can consider a bad credit lender who may be able to offer a more favourable rate on a remortgage.