Domain-wall enhancement of superconductivity in superconductor/ferromagnet hybrids: Case of weak ferromagnets