简体   繁体   English

在Woocommerce中仅保留社交登录自定义选项

[英]keep only social login custom option in Woocommerce

I install Plugin Woocommerce Social login from code canyon. 我从代码峡谷安装了插件Woocommerce Social登录。 And after we select product to add to cart, the customer have to choice which is manually login or using Social Login button. 在我们选择要添加到购物车的产品之后,客户必须选择手动登录还是使用“社交登录”按钮。 I would like customer to just have one choice which is using social login only instead of manually login. 我希望客户只有一种选择,即仅使用社交登录而不是手动登录。

You can see here, the two option of login enabled by Woocommerce Social login plugin: 您可以在此处看到Woocommerce Social登录插件启用的两种登录选项:

登录的两种选择

How to remove Woocommerce default login form keeping the social login button functionality? 如何删除保留社交登录按钮功能的Woocommerce默认登录表单?

To make customizations, you can override Woocommerce templates via your theme… First reed the following documentation, that explain how you can do that: 要进行自定义,您可以通过主题覆盖Woocommerce模板。首先介绍以下文档,以解释如何做到这一点:

Template structure & Overriding templates via a theme 模板结构和通过主题覆盖模板

The related template to override is: myaccount/form-login.php 要覆盖的相关模板是: myaccount/form-login.php

Once you have copied form-login.php template from woocommerce plugin to your active themes's "woocommerce" folder, in a "myaccount" subfolder: 将woocommerce插件的form-login.php模板复制到活动主题的“ woocommerce”文件夹后,在“ myaccount”子文件夹中:

  1. open edit it 打开编辑
  2. remove the code from line 38 to line 58 (all the code inside the <form> tags). 从第38行到第58行删除代码( <form>标记内的所有代码)。
  3. save

That should only keep your "Two options social login form". 那应该只保留您的“两个选项社交登录表单”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM