• Resolved shawfactor

    (@shawfactor)


    IMO the coming soon mode functionality added in the recent release should NOT be in the main plugin. This is purely a matter of opinion BUT what is not is that this is creating a problem for us as I administer a multi site and we already offer this functionality separately and with many more options through a different plugin we have built.

    As such I was wondering if there is a filter that disables/removes this functionality so that it cannot be used and create confusion?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @shawfactor

    You can add this code snippet to your child theme’s functions.php to exclude all customer-facing pages.

    add_filter( 'woocommerce_coming_soon_exclude', function() {
    return true;
    }, 10 );

    More info: https://github.com/woocommerce/woocommerce/blob/63d93d73551a1cc908e5385818796c9d042eca2f/docs/extension-development/integrating-coming-soon-mode.md#disabling-coming-soon-in-all-pages

    I hope this helps! If you have any other questions, feel free to ask.

    Thread Starter shawfactor

    (@shawfactor)

    The snippet does not achieve what I want. I don’t want administrators to have this functionality at all.IE I don’t want them to use it or see it.

    From readig the documentation the snippet stops the functionality from working in the front end but that still creates confusion on the back end.

    Right now an admin sees an live button in the back end and can set coming soon etc in the back end. I don’t want them have this functionality or see it. We already have better functionality for this in our multisite platform.

    More broadly why is this functionality part of the core woocommerce plugin? The functionality seems like it would make far more sense in its own extension…

    • This reply was modified 6 months, 1 week ago by shawfactor.
    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @shawfactor

    Right now an admin sees an live button in the back end and can set coming soon etc in the back end.

    Currently, there isn’t a direct filter to completely remove the site visibility mode from the backend. However, I found a pull request is in draft, which will provide an option to hide the level: https://github.com/woocommerce/woocommerce/pull/51398

    In the meantime, you can use this code snippet to hide/remove this badge:

    add_action(
        'admin_bar_menu',
        function ( $wp_admin_bar ) {
            $wp_admin_bar->remove_node( 'woocommerce-site-visibility-badge' );
        },
        100
    );

    Thanks again for your feedback. We appreciate your patience and understanding.

    Thread Starter shawfactor

    (@shawfactor)

    Thankyou for the snippet, it will definitely be useful.

    you missed the bigger point I made in your PR though. But I’ve addressed that on github

    Hi @shawfactor,

    it will definitely be useful.

    Glad to hear it.

    you missed the bigger point I made in your PR though. But I’ve addressed that on GitHub

    Our sincere apologies if we missed your larger point in the PR.

    However, GitHub is the right place to having addressed this, as your contribution is invaluable to us, and we want to make sure all your concerns are taken into consideration. Our devs will take a look at the PR and make any changes where necessary.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘filter to turn off Coming Soon Mode functionality’ is closed to new replies.