Disable wp_is_mobile() checks
-
You’re using wp_is_mobile() to decide how to render content (e.g. the “share bar” and the “whatsapp” icon) – however this isn’t compatible with caching and means the WhatsApp button isn’t available on desktop even when the app is installed and the button would otherwise work.
Could we have a way to disable these checks, or (preferably) move the device-specific styling to CSS so it can be more relevant, cached and we can tweak/override it?
Workaround
As a workaround for anybody who wishes to use this plugin and also use caching, this mu-plugin may help (but beware! It overrides _all_ frontend calls, not just SSBA ones).You can see the workaround here:
https://gist.github.com/Patabugen/7f88cdcc42b9e0fbd9ab8062404f33d5
The topic ‘Disable wp_is_mobile() checks’ is closed to new replies.