davisshaver / wp-rainbow

WordPress Plugin to Enable Sign-In With Ethereum using RainbowKit
https://wp-rainbow.davisshaver.com/
8 stars 5 forks source link

Add compatibility mode option for caching plugins #48

Open davisshaver opened 1 year ago

davisshaver commented 1 year ago

Inspired by feedback on the WordPress.org forum – do we want to add a compatibility mode for caching plugins?

Here is the user tip:

Autoptimize, WP Fastest Cache and WP Rocket really effects the functions of the plugin.

You can use them but the images for the wallets and the triggers no longer work if you minify anything. So avoid these, or alternatively customise the plugin so it’s excluded from cache/minification.

I tried with Autoptimize but there was absolutely no way of if being active and the Rainbow wallet popup working properly. I tried many custom codes.

This particular user was using a plugin called Reusable Blocks Extended which allows a block to be mapped to a shortcode.

Because RainbowKit Login relies on register_block_type() for enqueuing the required CSS & JS assets, there could be issues with the shortcode workaround – essentially the block code might get evaluated too late for the assets to be enqueued. So maybe we want to add a compatibility mode option for caching plugins where the CSS & JS gets added to every page.