From 84eaa48511fffc045188892673d692bc123b8e45 Mon Sep 17 00:00:00 2001 From: Jonathan Sadowski Date: Thu, 20 May 2021 14:17:19 -0500 Subject: [PATCH] Update exporter to include download IDs for possible retention on import --- includes/export/class-wc-product-csv-exporter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/export/class-wc-product-csv-exporter.php b/includes/export/class-wc-product-csv-exporter.php index a2380da9bee..0be4abb9c4f 100644 --- a/includes/export/class-wc-product-csv-exporter.php +++ b/includes/export/class-wc-product-csv-exporter.php @@ -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++;