I want to download the file name in the download history instead of the download name code.

When the $download['name'] changes to the $file['name'], the first line is deleted

<tr class="edd_download_history_row">
                        <?php
                        $price_id       = edd_get_cart_item_price_id( $download );
                        $download_files = edd_get_download_files( $download['id'], $price_id );
                        $name           = $download['name'];

                        // Retrieve and append the price option name
                        if ( ! empty( $price_id ) && 0 !== $price_id ) {
                            $name .= ' - ' . edd_get_price_option_name( $download['id'], $price_id, $payment->ID );
                        }

                        do_action( 'edd_download_history_row_start', $payment->ID, $download['id'] );
                        ?>
                        <td class="edd_download_download_name"><?php echo esc_html( $name ); ?></td>

EDD Image

0 Answers