WC_Product_CSV_Importer::parse_tax_status_field
Parse the tax status field.
Метод класса: WC_Product_CSV_Importer{}
Хуков нет.
Возвращает
Строку.
Использование
$WC_Product_CSV_Importer = new WC_Product_CSV_Importer(); $WC_Product_CSV_Importer->parse_tax_status_field( $value );
- $value(строка) (обязательный)
- Field value.
Код WC_Product_CSV_Importer::parse_tax_status_field() WC Product CSV Importer::parse tax status field WC 10.8.1
public function parse_tax_status_field( $value ) {
if ( '' === $value ) {
return $value;
}
// Remove the ' prepended to fields that start with - if needed.
$value = $this->unescape_data( $value );
if ( 'true' === strtolower( $value ) || 'false' === strtolower( $value ) ) {
$value = wc_string_to_bool( $value ) ? ProductTaxStatus::TAXABLE : ProductTaxStatus::NONE;
}
return wc_clean( $value );
}