Update exporter to include download IDs for possible retention on import

This commit is contained in:
Jonathan Sadowski 2021-05-20 14:17:19 -05:00
parent f3c9be0492
commit 84eaa48511
1 changed files with 3 additions and 0 deletions

View File

@ -601,10 +601,13 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
if ( $downloads ) {
$i = 1;
foreach ( $downloads as $download ) {
/* translators: %s: download number */
$this->column_names[ 'downloads:id' . $i ] = sprintf( __( 'Download %d ID', 'woocommerce' ), $i );
/* translators: %s: download number */
$this->column_names[ 'downloads:name' . $i ] = sprintf( __( 'Download %d name', 'woocommerce' ), $i );
/* translators: %s: download number */
$this->column_names[ 'downloads:url' . $i ] = sprintf( __( 'Download %d URL', 'woocommerce' ), $i );
$row[ 'downloads:id' . $i ] = $download->get_id();
$row[ 'downloads:name' . $i ] = $download->get_name();
$row[ 'downloads:url' . $i ] = $download->get_file();
$i++;