屏幕顶部的登录链接链接到错误的页面。据我推测,以下代码是链接的构造函数,但我不明白如何更改链接地址。链接指向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 没有乐趣。任何有关如何解析和操作链接目标的指导将不胜感激。
最佳答案
在结帐选项卡的 woocommerce 设置中,您可以检查页面是否指向您的结帐页面。
关于javascript - 结帐页面上的 WooCommerce 登录链接未链接到正确的页面(我的帐户),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28995738/