Stripe iframe causes a blank page on my print layout

An iframe being rendered from Stripe (Discourse Subscriptions plugin) is causing a blank page to be rendered at the bottom of my print layout. The iframe is hardcoded with display: block !important directly on the element so I can’t override the styles in a meaningful way.

I tried working around this by deleting the iframe when this route loads. This did not work, the stripe script just re-adds the iframe after some time.

Three possible solutions would work:

  1. I could remove the stripe script before it gets a chance to load (maybe?)
  2. I could fork the subscriptions code and add an admin setting with a blacklist (or whitelist) for pages to load Stripe on.
  3. It’s really not an ideal scenario for me to be inheriting the site layout for my /print route. Is there any way I can opt out, or set my own layout?

3 might solve multiple problems and be the most future proof for further things that would interfere with the print layout. But I’m not sure if changing the layout would disable the Stripe script?

The plugin is loading Stripe in plugin.rb.

I originally asked this question here.

1 Like