  Apparent period variations detected in several eclipsing, close-compact
binaries are frequently interpreted as being caused by circumbinary giant
planets. This interpretation raises the question of the origin of the potential
planets that must have either formed in the primordial circumbinary disk,
together with the host binary star, and survived its evolution into a
close-compact binary or formed in a post-common-envelope circumbinary disk that
remained bound to the post-common-envelope binary (PCEB). Here we combine
current knowledge of planet formation and the statistics of giant planets
around primordial and evolved binary stars with the theory of close-compact
binary star evolution aiming to derive new constraints on possible formation
scenarios. We compiled a comprehensive list of observed eclipsing PCEBs,
estimated the fraction of systems showing apparent period variations,
reconstructed the evolutionary history of the PCEBs, and performed binary
population models of PCEBs to characterize their main sequence binary
progenitors. We reviewed the currently available constraints on the fraction of
PCEB progenitors that host circumbinary giant planets. We find that the
progenitors of PCEBs are very unlikely to be frequent hosts of giant planets
(<~10 per cent), while the frequency of PCEBs with observed apparent period
variations is very high (~90 per cent). The variations in eclipse timings
measured in eclipsing PCEBs are probably not caused by first-generation planets
that survived common-envelope evolution. The remaining options for explaining
the observed period variations are second-generation planet formation or
perhaps variations in the shape of a magnetically active secondary star. We
suggest observational tests for both options.
