skip to Main Content

I need help, does anyone know how to show the download buttons for digital products like this, in my case it appears with a long name, I want to change it to a simple text that says DOWNLOAD

enter image description here

2

Answers


  1. You will have to override the order/order-downloads Woocommerce template.

    If you’re not sure how to do so, check out the official Woocommerce guide on it.

    Login or Signup to reply.
  2. Try this code, put in your child-theme > function.php:

    add_filter( 'woocommerce_customer_get_downloadable_products', 'sss_change_download_button_name', 9999, 1 );
    function sss_change_download_button_name( $downloads ) {
        if($downloads){
            foreach($downloads as $key => $download){
                $downloads[$key]['download_name'] = 'DOWNLOAD';
            }
        }
        return $downloads;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search