chnage download_url in woocommerce

i want to change the download_url in woocommerce

my-account : http://localhost/i/account

downloads : http://localhost/i/account/downloads

  • before : http://localhost/i/?download_file=
  • after : http://localhost/i/account/downloads/download_file=

path : /plugins/woocommerce/includes/wc-user-functions.php | lines 632 to 640

line 639 = change home_url( ‘/’ ) to home_url( ‘/account/downloads/’ )

i have a hook for changes but i do not know how to call that part through the hook :

function filter_woocommerce_customer_available_downloads( $downloads, $customer_id ) { 
    
    return $downloads; 
} add_filter( 'woocommerce_customer_available_downloads', 'filter_woocommerce_customer_available_downloads', 10, 2 );

and i had another change, remove the question mark : change /?download_file= to /download_file=