• Resolved rainelan

    (@rainelan)


    Hey!

    I wonder how to disable this on desktop and show it or enable plugin only on mobile. Could you suggest me something?

    My co-worker tried this

    function disable_multistep_checkout_desktop () {
        global $THWMSCF;
    
        if ( !wp_is_mobile() ) {
            remove_action( 'init', array( $THWMSCF, 'init' ));
        }
    }
    add_action( 'after_setup_theme', 'disable_multistep_checkout_desktop');

    But this doesn’t work anymore… I myself use this atm but this isn’t stable:

    if (!wp_is_mobile()){
    
        deactivate_plugins( '/woo-multistep-checkout/woo-multistep-checkout.php' );
    }
    else {
    
        activate_plugin( '/woo-multistep-checkout/woo-multistep-checkout.php' );
    }

    Plugin itself is good and nice 🙂

    • This topic was modified 6 years, 1 month ago by rainelan.
Viewing 1 replies (of 1 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    The current version of the plugin doesn’t have an option to dynamically remove the multistep checkout feature. If the second option is working fine, then you can continue the same.

    Also from the next version onwards, we will add a filter to modify the settings to enable the multistep in the plugin. So you can use the same filter for this dynamically disabling of the plugin.

    Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Disable on desktop’ is closed to new replies.