Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36014
    Profile photo of Greg
    Greg
    Participant

    Is there a way I can change the display name for file downloads. The are currently media.some number, is it possible to change that? Since it is just for the download link, can i just be chang it to ‘download’?

    #36025
    Profile photo of Greg
    Greg
    Participant

    I think you mean the name of the downloaded file itself? I am talking about the file name displayed on the website account download page, e.g. ef7e28.media. I’d like to change this to just ‘download’ but it still retain the correct link to download the ef7e28.media file. It is simply tidier and clean fro the customer to see.

    Cheers

    #36027
    Profile photo of Hebstreit
    Hebstreit
    Participant

    Hi Greg, .. it seems there is a folder beside your symbio_media folder named ssdl or equal. maybe it could be a problem to have one name for more than one files.

    #36029
    Profile photo of Greg
    Greg
    Participant

    I’m still not sure what you understand to be my question/request. Probably because I am not explaining myself properly 🙂

    I’m not wanting to change the actual file name at all.

    What I am wanting to do is change the link name to the file,

    Email Example

    Website Example

    Cheers

    #36030
    Profile photo of Greg
    Greg
    Participant

    OK found it and have changed it. If anyone else is interested

    wp-content/plugins/woocommerce/templates/order/order-downloads.php

    Change this (line 53)

    echo '<a href="' . esc_url( $download['download_url'] ) . '" class="woocommerce-MyAccount-downloads-file button alt">' . esc_html( $download['download_name'] ) . '</a>';

    to this and then save it in your (child) theme woocommerce/order/ folder with the same name

    echo '<a href="' . esc_url( $download['download_url'] ) . '" class="woocommerce-MyAccount-downloads-file button alt">Download</a>';

    Now the buttons say Download

    Changed

    Cheers

    #36035
    Profile photo of Robin
    Robin
    Keymaster

    Very nice – thanks for sharing!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.