WC_Product_CSV_Importer::parse_backorders_field
Parse backorders from a CSV.
Method of the class: WC_Product_CSV_Importer{}
No Hooks.
Returns
String.
Usage
$WC_Product_CSV_Importer = new WC_Product_CSV_Importer(); $WC_Product_CSV_Importer->parse_backorders_field( $value );
- $value(string) (required)
- Field value.
WC_Product_CSV_Importer::parse_backorders_field() WC Product CSV Importer::parse backorders field code WC 10.8.1
public function parse_backorders_field( $value ) {
if ( empty( $value ) ) {
return 'no';
}
$value = $this->parse_bool_field( $value );
if ( 'notify' === $value ) {
return 'notify';
} elseif ( is_bool( $value ) ) {
return $value ? 'yes' : 'no';
}
return 'no';
}