Merge branch 'feature/product-csv-import-export' into feature/15302

# Conflicts:
#	includes/export/class-wc-product-csv-exporter.php
This commit is contained in:
Mike Jolley 2017-05-31 12:13:42 +01:00
commit 72ddb1f23d
2 changed files with 7 additions and 2 deletions

View File

@ -448,7 +448,7 @@ class WC_Product_CSV_Importer_Controller {
'attributes:name' => __( 'Attribute %d name', 'woocommerce' ),
'attributes:value' => __( 'Attribute %d value(s)', 'woocommerce' ),
'attributes:visible' => __( 'Attribute %d visible', 'woocommerce' ),
'attributes:taxonomy' => __( 'Is attribute %d global?', 'woocommerce' ),
'attributes:taxonomy' => __( 'Attribute %d global', 'woocommerce' ),
'attributes:default' => __( 'Attribute %d default', 'woocommerce' ),
'downloads:name' => __( 'Download %d name', 'woocommerce' ),
'downloads:url' => __( 'Download %d URL', 'woocommerce' ),

View File

@ -464,7 +464,8 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
foreach ( $attributes as $attribute_name => $attribute ) {
$this->column_names[ 'attributes:name' . $i ] = sprintf( __( 'Attribute %d name', 'woocommerce' ), $i );
$this->column_names[ 'attributes:value' . $i ] = sprintf( __( 'Attribute %d value(s)', 'woocommerce' ), $i );
$this->column_names[ 'attributes:taxonomy' . $i ] = sprintf( __( 'Is attribute %d global?', 'woocommerce' ), $i );
$this->column_names[ 'attributes:visible' . $i ] = sprintf( __( 'Attribute %d visible', 'woocommerce' ), $i );
$this->column_names[ 'attributes:taxonomy' . $i ] = sprintf( __( 'Attribute %d global', 'woocommerce' ), $i );
if ( is_a( $attribute, 'WC_Product_Attribute' ) ) {
$row[ 'attributes:name' . $i ] = wc_attribute_label( $attribute->get_name(), $product );
@ -483,6 +484,8 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
$row[ 'attributes:value' . $i ] = implode( ', ', $attribute->get_options() );
$row[ 'attributes:taxonomy' . $i ] = 0;
}
$row[ 'attributes:visible' . $i ] = $attribute->get_visible();
} else {
$row[ 'attributes:name' . $i ] = wc_attribute_label( $attribute_name, $product );
@ -494,6 +497,8 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
$row[ 'attributes:value' . $i ] = $attribute;
$row[ 'attributes:taxonomy' . $i ] = 0;
}
$row[ 'attributes:visible' . $i ] = '';
}
if ( $product->is_type( 'variable' ) && isset( $default_attributes[ sanitize_title( $attribute_name ) ] ) ) {