Woocommerce Cannot Disable Guest Checkout

I use Woocommerce and I have problems disabling guest checking.

I made sure that “Enable guest check” is not listed on the settings page, but people can still check without creating an account or registering.

Somewhere else I had to fix it?

+5
source share
3 answers

Try viewing the site in a different browser from the one you are working with. I found that logging in as a user in wordpress-admin also made me an active, registered user for verification.

0
source

You also need to brush off the Woocommerce → Accounts tab. Where he says Enable Registration on the Checkout page .

0
source

Go to WooCommerce> Accounts and unregister on the "Checkout" page.

That should work!

screenshot

Alternatively, you can add this code to your functions.php theme.

add_action( 'template_redirect', 'woo_restirct_checkout' ); function woo_restirct_checkout() { if ( !is_user_logged_in() && is_checkout() ) { $my_account_url = get_permalink( get_option('woocommerce_myaccount_page_id') ); wp_redirect( $my_account_url ); exit; } } 

Cheers, Francesco

0
source

Source: https://habr.com/ru/post/1200478/


All Articles