• In my WP install, I am loading different themes as per user-agent.
    I wish to deactivate a plugin for mobile users.

    The path of plugin is:
    ~/public_html/wp-content/plugins/myplugin/myplugin.php

    Therefore I placed the following in my theme’s functions.php
    deactivate_plugins('/wp-content/plugins/woocommerce-cart-tab/cart-tab.php')

    But it breaks the website.
    Is this the correct way to accomplish this?

  • The topic ‘Deactivate a plugin via theme functions.php’ is closed to new replies.