wordpress WooCommerce 需要注册才能购买
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24747095/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WooCommerce require registration to buy
提问by markobarna
I need to require a user registration before buying a product. Right now, when you add a product to the cart, then in the check out you can fill all the fields with your information but without a wordpress login. There is a simple option to create an account but is optional.
我需要在购买产品之前要求用户注册。现在,当您将产品添加到购物车时,在结帐时您可以使用您的信息填写所有字段,但无需登录 wordpress。有一个创建帐户的简单选项,但它是可选的。
I'd like to know if is possible to modify the check out page to redirect a register page.
我想知道是否可以修改结帐页面以重定向注册页面。
is it possible?
是否可以?
So if you wish to give any suggestion or any interesting link that will also be highly appreciable.
因此,如果您想提供任何建议或任何有趣的链接,这也将是非常值得赞赏的。
回答by helgatheviking
In your site's admin go to WooCommerce>Settings>Checkout ex:
在您网站的管理员中,转到 WooCommerce>设置>结帐前:
http://yoursite.com/wp-admin/admin.php?page=wc-settings&tab=checkout
http://yoursite.com/wp-admin/admin.php?page=wc-settings&tab=checkout
And make sure that "Enable guest checkout" is unchecked
并确保未选中“启用访客结帐”
UPDATE for WooCommmerce 3.4+
WooCommerce 3.4+ 更新
Pretty sure it was 3.4 when WooCommerce added it's privacy tools to help with GDPR compliance. This setting is now under
当 WooCommerce 添加它的隐私工具以帮助遵守 GDPR 时,可以肯定它是 3.4。此设置现在在
WooCommerce>Settings>Accounts&Privacy
WooCommerce>设置>帐户和隐私
or
或者
wp-admin/admin.php?page=wc-settings&tab=account
wp-admin/admin.php?page=wc-settings&tab=account
回答by Bret Weinraub
There are three rows in wp_options that I suggest you set for this [recommended value]:
wp_options 中有三行我建议你设置这个[推荐值]:
- woocommerce_enable_guest_checkout [no]
- woocommerce_enable_signup_and_login_from_checkout [yes]
- woocommerce_enable_checkout_login_reminder [yes]
- woocommerce_enable_guest_checkout [否]
- woocommerce_enable_signup_and_login_from_checkout [是]
- woocommerce_enable_checkout_login_reminder [是]
You can edit them in the admin console here:
您可以在此处的管理控制台中编辑它们:
/wp-admin/admin.php?page=wc-settings&tab=account
/wp-admin/admin.php?page=wc-settings&tab=account