1
votes

I've been trying to modify the column title of downloadable products on WooCommerce Order received (Thank you) page.

Specifically the "download-product" column. It will have the header 'Product'. I'm trying to change it to something else.

I've already been able to remove the Expires and Downloads remaining segments of the table but I haven't been able to figure out how to modify the titles of each column.

Any advice would be greatly appreciated.

1

1 Answers

0
votes

The following will allow you to change on downloads table the column label "Product" to something else in Thankyou page:

// Change downloads specific column label name
add_filter( 'woocommerce_account_downloads_columns', 'filter_wc_account_downloads_columns' );
function filter_wc_account_downloads_columns( $columns ) {
    // Targeting Thankyou page only
    if ( is_wc_endpoint_url( 'order-received' ) ) {
        $columns['download-product'] = __( 'Name', 'woocommerce' );
    }
    return $columns;
}

Code goes in functions.php file of your active child theme (or active theme). Tested and works.

Related: Display product image on Woocommerce My Account Downloads section