Hey Ronny ( @ronnyadsetts ),
Thank you very much for reaching out to us. Happy to help you with your question!
First, my apologies for the delay in my response. We’ve been experiencing a high support volume lately, which has definitely slowed us down. We’re working feverishly to reach out to all merchants and actively hiring new team members, so we should be back to our usual response time soon! I really appreciate your patience!
Regarding your request, we haven’t fully tested the following process on our end, but this can act as a great starting point if you’d like to proceed. You can filter the following:
/**
* Filters whether the Facebook messenger is enabled.
*
* @since 1.10.0
*
* @param bool $is_enabled whether the Facebook messenger is enabled
* @param \WC_Facebookcommerce_Integration $integration the integration instance
*/
return (bool) apply_filters( 'wc_facebook_is_messenger_enabled', 'yes' === get_option( self::SETTING_ENABLE_MESSENGER ), $this );
so it’ll return false until the cookie is accepted, and then passing the value of $is_enabled instead if you still want to leave it disabled via plugin settings.
For reference, that’s called during the inject_messenger_chat_plugin() function which is hooked into wp_footer, so when it returns true, it will print out the HTML div and script to load messenger.
Would you please let me know if the above is helpful? Anything else I can help you with?
Best regards,
Pit
SkyVerge