• Resolved wzshop

    (@wzshop)


    Hi,
    So I read that I should disable the setting “Disable wordpress application passwords?”, allowing for the Woocommerce mobile app to work. This did the trick and now I am able to login to my site with the Woocommerce mobile app.

    I do have the question though, if I can now enable the “Disable wordpress application passwords?” option again, and thus disallowing new thirdparty connections. Will this indeed block any new thirdparty connections or will this actually cause for the Woocommerce app to stop working again?

    Thanks, WZ

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @wzshop, thanks for your question.

    Disabling WordPress application passwords again would cause the feature to be unavailable, even if you’ve set one for the WooCommerce app already.

    A solution could be to leave application passwords enabled but add JavaScript to selectively hide the section on the users’ “Profile” page in your theme or a plugin that lets you add custom JavaScript:

    jQuery('h2:contains("Application Passwords")').hide();
    jQuery('h2:contains("Application Passwords")').next().hide();

    Unfortunately we can’t support custom code changes, so please only do this if you’re comfortable doing so.

    Many thanks,
    Peter.

    Thread Starter wzshop

    (@wzshop)

    Hi Peter,

    Thank you so much for your quick reply.
    I don’t believe Woocommerce or my theme shows this option to users/customers (not 100% sure however). I was mainly asking if it was possible, to just let 1 thirdparty connect through an application password, and disable any other attempts/applications. But, if I get you right, this is not possible.

    Thanks for your reply, WZ

    Plugin Support wfpeter

    (@wfpeter)

    Unfortunately disabling of application passwords isn’t possible without any preconfigured ones being disabled too. Thanks @wzshop for your question and feature request topic – which has been passed to the team for discussion.

    Peter.

    Thread Starter wzshop

    (@wzshop)

    Just for the record, the below code allows you to enable/disable the application passwords by ID

    function my_prefix_customize_app_password_availability(
        $available,
        $user
    ) {
        if ( $user !== 1 ) {
            $available = false;
        }
     
        return $available;
    }
     
    add_filter(
        'wp_is_application_passwords_available_for_user',
        'my_prefix_customize_app_password_availability',
        10,
        2
    );

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.