rebase on oct-10-2023
This commit is contained in:
@@ -398,8 +398,10 @@ abstract class WC_CSV_Exporter {
|
||||
$use_mb = function_exists( 'mb_convert_encoding' );
|
||||
|
||||
if ( $use_mb ) {
|
||||
$encoding = mb_detect_encoding( $data, 'UTF-8, ISO-8859-1', true );
|
||||
$data = 'UTF-8' === $encoding ? $data : utf8_encode( $data );
|
||||
$is_valid_utf_8 = mb_check_encoding( $data, 'UTF-8' );
|
||||
if ( ! $is_valid_utf_8 ) {
|
||||
$data = mb_convert_encoding( $data, 'UTF-8', 'ISO-8859-1' );
|
||||
}
|
||||
}
|
||||
|
||||
return $this->escape_data( $data );
|
||||
|
||||
@@ -182,7 +182,7 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter {
|
||||
$variable_products = array();
|
||||
|
||||
foreach ( $products->products as $product ) {
|
||||
// Check if the category is set, this means we need to fetch variations seperately as they are not tied to a category.
|
||||
// Check if the category is set, this means we need to fetch variations separately as they are not tied to a category.
|
||||
if ( ! empty( $args['category'] ) && $product->is_type( 'variable' ) ) {
|
||||
$variable_products[] = $product->get_id();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user