我正在努力将自定义端点插入WooCommerce page中的“我的帐户”页面,但不知道如何指向“更改密码”页面。我将此代码用于函数:
function wpb_woo_my_account_order() {
$myorder = array(
'downloads' => __( 'Objednávky', 'woocommerce' ),
'edit-address' => __( 'Adresa', 'woocommerce' ),
'edit-account' => __( 'Detaily účtu', 'woocommerce' ),
'/author/' . $current_user->display_name . '?edit_info' => __( 'Změnit
heslo', 'woocommerce' ),
'customer-logout' => __( 'Odhlášení', 'woocommerce' ),
);
return $myorder;
}
add_filter ( 'woocommerce_account_menu_items', 'wpb_woo_my_account_order' );
在“Změnitheslo”端点我想指向
/author/' . $current_user->display_name . '?edit_info
因为这是更改密码的URL,但似乎无法正常工作。