WC_Product_CSV_Importer::parse_backorders_field( string $value )

Parse backorders from a CSV.


Description Description


Parameters Parameters

$value

(Required) Field value.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/import/class-wc-product-csv-importer.php

	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';
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.