WC_Product_CSV_Importer::parse_cogs_field │ public │ WC 1.0

Parse the Cost of Goods Sold field.

Метод класса: WC_Product_CSV_Importer{}

Хуков нет.

Возвращает

float|null.

Использование

$WC_Product_CSV_Importer = new WC_Product_CSV_Importer();
$WC_Product_CSV_Importer->parse_cogs_field( $value );
$value(строка) (обязательный)
Field value.

Код WC_Product_CSV_Importer::parse_cogs_field() WC 11.3.0

public function parse_cogs_field( $value ) {
	return '' === $value ? null : (float) wc_format_decimal( $value );
}