Wettability is a pore-scale property that has an important impact on capillarity, residual trapping, and hysteresis in porous media systems. In many applications, the wettability of the rock surface is assumed to be constant in time and uniform in space. However, many fluids are capable of altering the wettability of rock surfaces permanently and dynamically in time. Experiments have shown wettability alteration can significantly decrease capillarity in CO$_2$ storage applications. For these systems, the standard capillary-pressure model that assumes static wettability is insufficient to describe the physics. In this paper, we develop a new dynamic capillary-pressure model that takes into account changes in wettability at the pore-level by adding a dynamic term to the standard capillary pressure function. We simulate the dynamic system using a bundle-of-tubes (BoT) approach, where a mechanistic model for time-dependent contact angle change is introduced at the pore scale. The resulting capillary pressure curves are then used to quantify the dynamic component of the capillary pressure function. This study shows the importance of time-dependent wettability for determining capillary pressure over timescales of months to years. The impact of wettability has implications for experimental methodology as well as macroscale simulation of wettability-altering fluids.