WooCommerce 网站中的单独注册页面 [英] Separate registration page in WooCommerce website

查看:32
本文介绍了WooCommerce 网站中的单独注册页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮我在 WooCommerce 中建立一个单独的注册页面,而不是在 my-account 页面中显示它?

Can anybody help me build a separate registration page in WooCommerce instead of displaying it in the my-account page?

my-account 页面中,我想显示一个链接,将买家带到注册页面.

In the my-account page I want to display a link which will take the buyer to the registration page.

推荐答案

编辑您的 form-login.php 文件并将登录表单和注册表单分为两个不同的部分,例如 A 部分和 B 部分.

edit your form-login.php file and seperate the login form and registration form in two different sections say section A and B.

现在检查页面中的 GET 参数,该参数将定义要显示的部分.默认情况下会显示登录信息,如果找到参数并且是注册",则显示注册部分

now check for a GET parameter in the page which will define which section to show. By default login will be shown, if parameter is found and is "register", show registration section

if( isset( $_GET['action']) && $_GET['action'] == "register"){
    // Section for registration
}else {
    // Section for Login form
}

您可以提供注册链接

<a href="' .get_permalink(woocommerce_get_page_id('myaccount')). '?action=register"> register </a>

这篇关于WooCommerce 网站中的单独注册页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆