I'm using WooCommerce plugin in Wordpress.
I would like to change the URL of the "Downloads" link that appears on "my-account" page created by WooCommerce.
I want to change it from linking to /my-account/downloads/
to /customer-area/dashboard/
I tried to add a custom function that changed the titles and endpoints of menu items.
function wpb_woo_my_account_order() {
$myorder = array(
'edit-account' => __( 'Change My Details', 'woocommerce' ),
'dashboard' => __( 'Dashboard', 'woocommerce' ),
'orders' => __( 'Orders', 'woocommerce' ),
'customer-area/dashboard' => __( 'Download MP4s', 'woocommerce' ),
'edit-address' => __( 'Addresses', 'woocommerce' ),
'payment-methods' => __( 'Payment Methods', 'woocommerce' ),
'customer-logout' => __( 'Logout', 'woocommerce' ),
);
return $myorder;
}
add_filter ( 'woocommerce_account_menu_items', 'wpb_woo_my_account_order' );
However, whatever endpoint I use, it remains nested inside /my-account/
How can I change that?