Measure the doorway opening with the door in its usual position. Handles and hinges can take up room inside the opening.
Measure the widest part of the hamper with its handles out. If laundry usually sticks above the rim, allow space for that too.
Try carrying an empty cardboard box of similar size along the route. Check the tight turn by the sink before deciding to buy.