Merge pull request #19504 from woocommerce/fix/19485-backorder-import
Product import backorders default to no
This commit is contained in:
commit
5547c57c03
|
@ -491,7 +491,7 @@ class WC_Product_CSV_Importer extends WC_Product_Importer {
|
|||
*/
|
||||
public function parse_backorders_field( $value ) {
|
||||
if ( empty( $value ) ) {
|
||||
return '';
|
||||
return 'no';
|
||||
}
|
||||
|
||||
$value = $this->parse_bool_field( $value );
|
||||
|
@ -502,7 +502,7 @@ class WC_Product_CSV_Importer extends WC_Product_Importer {
|
|||
return $value ? 'yes' : 'no';
|
||||
}
|
||||
|
||||
return '';
|
||||
return 'no';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -306,7 +306,7 @@ class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case {
|
|||
'tax_class' => 'standard',
|
||||
'stock_status' => 'instock',
|
||||
'stock_quantity' => '',
|
||||
'backorders' => '',
|
||||
'backorders' => 'no',
|
||||
'sold_individually' => '',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
|
@ -358,7 +358,7 @@ class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case {
|
|||
'tax_class' => 'standard',
|
||||
'stock_status' => 'instock',
|
||||
'stock_quantity' => '',
|
||||
'backorders' => '',
|
||||
'backorders' => 'no',
|
||||
'sold_individually' => '',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
|
@ -394,7 +394,7 @@ class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case {
|
|||
'tax_class' => '',
|
||||
'stock_status' => 'outofstock',
|
||||
'stock_quantity' => '',
|
||||
'backorders' => '',
|
||||
'backorders' => 'no',
|
||||
'sold_individually' => '',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
|
@ -446,7 +446,7 @@ class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case {
|
|||
'tax_class' => 'standard',
|
||||
'stock_status' => 'instock',
|
||||
'stock_quantity' => 6,
|
||||
'backorders' => '',
|
||||
'backorders' => 'no',
|
||||
'sold_individually' => '',
|
||||
'weight' => 1.0,
|
||||
'length' => 2.0,
|
||||
|
@ -536,7 +536,7 @@ class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case {
|
|||
'tax_class' => '',
|
||||
'stock_status' => 'instock',
|
||||
'stock_quantity' => '',
|
||||
'backorders' => '',
|
||||
'backorders' => 'no',
|
||||
'sold_individually' => '',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
|
|
Loading…
Reference in New Issue