WC_Product_CSV_Importer::parse_stock_quantity_field( string $value )
Parse the stock qty field.
Description Description
Parameters Parameters
- $value
-
(Required) Field value.
Return Return
(float|string)
Source Source
File: includes/import/class-wc-product-csv-importer.php
public function parse_stock_quantity_field( $value ) {
if ( '' === $value ) {
return $value;
}
// Remove the ' prepended to fields that start with - if needed.
$value = $this->unescape_data( $value );
return wc_stock_amount( $value );
}