TOS is showing up in Woocommerce "my-account" page when registering new user account

Hi all, yesterday i updated woocommerce, but i don't have sure if its related with woocommerce update, i have activated "register user account" in wc settings and when i refresh page it displays TOS add-on.

http://lojaonline.wpbravo.com/my-account/

  • Patrick
    • Support Monkey

    Hi there @pedro_resina

    I hope you're well today!

    Forgive me if I sound a bit confused, but that is exactly what the Terms of Service plugin is designed to do: it appears on your site wherever you have a register form.

    There is a register form on that page, so the TOS box will display there.

  • pedro_resina
    • The Incredible Code Injector

    Hi Patrick :slight_smile: , but this is a subsite and not the main network site, i thought the TOS was only for displaying in main network site when registering a new site/blog and not a costumer/user account in a subsite.

    It doesn't make sense when a user is reading a TOS related to the main network site when the costumer/user only wants to create a simple account to buy products or to apply for affiliate.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @pedro_resina

    Hope you are doing good today :slight_smile:

    Add below code in functions.php file of your child theme or use mu-plugin.

    This function will remove TOS from all sub-sites.

    add_action( 'init', 'wpmu_remove_tos_from_subsites', 100) ;
    function wpmu_remove_tos_from_subsites() {
    
    	if ( !is_main_site() ) {
    		remove_action('signup_extra_fields', 'signup_tos_field_wpmu', 20);
    		remove_action('register_form', 'signup_tos_field_wp');
    		remove_action( 'wpmu_validate_user_signup', 'signup_tos_filter_wpmu' );
    		remove_action( 'bp_signup_validate', 'signup_tos_filter_bp' );
    		remove_action( 'registration_errors', 'signup_tos_validate_wp' );
    		remove_action( 'admin_menu', 'signup_tos_plug_pages' );
    		remove_action( 'network_admin_menu', 'signup_tos_plug_pages' );
    		remove_action( 'plugins_loaded', 'signup_tos_localization' );
    		remove_action( 'signup-tos', 'signup_tos_shortcode' );
    	}
    }

    Take care and have a nice day :slight_smile:

    Cheer, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.