This commit is contained in:
parent
e05a191156
commit
0e7c13d883
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix Ampersand changed to & on product attribute export
|
|
@ -467,7 +467,7 @@ abstract class WC_CSV_Exporter {
|
|||
$values_to_implode = array();
|
||||
|
||||
foreach ( $values as $value ) {
|
||||
$value = (string) is_scalar( $value ) ? $value : '';
|
||||
$value = (string) is_scalar( $value ) ? html_entity_decode( $value, ENT_QUOTES ) : '';
|
||||
$values_to_implode[] = str_replace( ',', '\\,', $value );
|
||||
}
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
|
|||
$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 );
|
||||
$row[ 'attributes:name' . $i ] = html_entity_decode( wc_attribute_label( $attribute->get_name(), $product ), ENT_QUOTES );
|
||||
|
||||
if ( $attribute->is_taxonomy() ) {
|
||||
$terms = $attribute->get_terms();
|
||||
|
@ -671,14 +671,14 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
|
|||
|
||||
$row[ 'attributes:visible' . $i ] = $attribute->get_visible();
|
||||
} else {
|
||||
$row[ 'attributes:name' . $i ] = wc_attribute_label( $attribute_name, $product );
|
||||
$row[ 'attributes:name' . $i ] = html_entity_decode( wc_attribute_label( $attribute_name, $product ), ENT_QUOTES );
|
||||
|
||||
if ( 0 === strpos( $attribute_name, 'pa_' ) ) {
|
||||
$option_term = get_term_by( 'slug', $attribute, $attribute_name ); // @codingStandardsIgnoreLine.
|
||||
$row[ 'attributes:value' . $i ] = $option_term && ! is_wp_error( $option_term ) ? str_replace( ',', '\\,', $option_term->name ) : str_replace( ',', '\\,', $attribute );
|
||||
$row[ 'attributes:value' . $i ] = $option_term && ! is_wp_error( $option_term ) ? html_entity_decode( str_replace( ',', '\\,', $option_term->name ), ENT_QUOTES ) : html_entity_decode( str_replace( ',', '\\,', $attribute ), ENT_QUOTES );
|
||||
$row[ 'attributes:taxonomy' . $i ] = 1;
|
||||
} else {
|
||||
$row[ 'attributes:value' . $i ] = str_replace( ',', '\\,', $attribute );
|
||||
$row[ 'attributes:value' . $i ] = html_entity_decode( str_replace( ',', '\\,', $attribute ), ENT_QUOTES );
|
||||
$row[ 'attributes:taxonomy' . $i ] = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue