0
votes

I am trying to reduce the table so it's just the download product title and the button to download the product. Here are the columns I want to remove "Downloads remaining" and "Expires" from Order received and My Account… Here is a screenshot.

To be able to only see the Product Name and Download Button

1
What have you done/tried? – Peter

1 Answers

4
votes

Try the following code that should remove "Downloads remaining" and "Downloads Expires" from everywhere (even on email notifications):

add_action( 'woocommerce_account_downloads_columns', 'custom_downloads_columns', 10, 1 ); // Orders and account
add_action( 'woocommerce_email_downloads_columns', 'custom_downloads_columns', 10, 1 ); // Email notifications
function custom_downloads_columns( $columns ){
    // Removing "Download expires" column
    if(isset($columns['download-expires']))
        unset($columns['download-expires']);

    // Removing "Download remaining" column
    if(isset($columns['download-remaining']))
        unset($columns['download-remaining']);

    return $columns;
}

Code goes in function.php file of your active child theme (or active theme). It should works.