结帐页面上的WooCommerce登录链接未链接到正确的页面(我的帐户)

时间:2015-03-11 19:34:06

标签: javascript php wordpress wordpress-plugin woocommerce

屏幕顶部的登录链接指向错误的页面。尽管我可以推测下面的代码是链接的构造函数,但我不明白如何更改链接地址。链接指向https://whatcomhumane.org/wpwhsnew/checkout/#,我希望它指向http://whatcomhumane.org/wpwhsnew/my-account

do_action( 'woocommerce_before_checkout_form', $checkout );

这是以上操作后面的代码:

// If checkout registration is disabled and not logged in, the user cannot checkout
if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_user_logged_in() ) {
    echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) );
    return;
}

// filter hook for include new pages inside the payment method
$get_checkout_url = apply_filters( 'woocommerce_get_checkout_url', WC()->cart->get_checkout_url() ); ?>

我使用notepad ++来递归搜索网站主目录中的术语 woocommerce_before_checkout_form和$ checkout但无法找到定义动作或变量的位置,在主题的函数文件中查找,T no joy。任何关于如何解决和操纵链接目的地的方向将不胜感激。

2 个答案:

答案 0 :(得分:1)

在结帐选项卡中的woocommerce设置中,您可以检查页面是否指向您的结帐页面。

答案 1 :(得分:0)

好的/#实际上是正确的,因为适当的行为是页面加载时隐藏登录字段,点击登录类改变样式从显示无显示块。确定这一小批代码是js驾驶行动。

    var wc_checkout_login_form = {
    init: function() {
        $( 'body' ).on( 'click', 'a.showlogin', this.show_login_form );
    },
    show_login_form: function( e ) {
        $( 'form.login' ).slideToggle();
        return false;
    }
}

使用chrome中的开发人员工具查找,帮助我确定我的移动器和振动器(函数和方法)在代码结构中的位置。这样就不需要操作了。

结束我在我的安装中有各种版本的WooCommerce,只需要ftp进入网站并用最新版本替换WooCommerce插件文件夹。很容易,但我想知道为什么我的woo更新程序没有显示我需要更新到2.3.5?任何它如何按照现在的规格和下一个要求工作。在WooThemes的Caleb非常有帮助和耐心。