WC_Product_CSV_Importer::parse_float_field
Parse a float value field.
Method of the class: WC_Product_CSV_Importer{}
No Hooks.
Returns
float|String.
Usage
$WC_Product_CSV_Importer = new WC_Product_CSV_Importer(); $WC_Product_CSV_Importer->parse_float_field( $value );
- $value(string) (required)
- Field value.
WC_Product_CSV_Importer::parse_float_field() WC Product CSV Importer::parse float field code WC 10.6.2
public function parse_float_field( $value ) {
if ( '' === $value ) {
return $value;
}
// Remove the ' prepended to fields that start with - if needed.
$value = $this->unescape_data( $value );
return floatval( $value );
}