One way would be to only enable the plugin for some pages. Create this file in wp-content/mu-plugins/important-filters.php
with contents:
<?php
// make sure this isn't an admin page
if (!preg_match('/wp-admin/', $_SERVER['REQUEST_URI'])) {
if (!preg_match('/my-chat-page/', $_SERVER['REQUEST_URI'])) {
// remove the plugin from active plugin list
add_filter('option_active_plugins', function($value, $option) {
if (($key = array_search("facebook-messenger-customer-chat/facebook-messenger-customer-chat.php", $value)) !== false) {
array_splice($value, $key, 1);
}
return $value;
}, 10, 2);
}
}
This will remove the facebook plugin from non-admin pages that don’t match “my-chat-page”.
-
This reply was modified 4 years, 1 month ago by
zebfross. Reason: added comments