Doesn’t Work
-
Doesn’t work. Installed for the Selective Plugin Loading. Followed the guide, set Selective Plugin Loading to on, moved the file over to the proper mu-plugins folder, and still didn’t work on disabling plugins on a per-page basis. Would go to product page, check the plugins to disable, save, and wouldn’t do anything. all plugins would still run.
ended up just adding this code to a php file and uploaded to the mu-plugins folder, worked like a dream:
$request_uri = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); $is_admin = strpos( $request_uri, '/wp-admin/' ); if( false === $is_admin ){ add_filter( 'option_active_plugins', function( $plugins ){ global $request_uri; $is_contact_page = strpos( $request_uri, '/gift-card/' ); $myplugins = array( "woo-variation-gallery-pro/woo-variation-gallery-pro.php", "woo-variation-gallery/woo-variation-gallery.php" ); if( false !== $is_contact_page ){ $plugins = array_diff( $plugins, $myplugins ); } return $plugins; } ); }
- The topic ‘Doesn’t Work’ is closed to new replies.