WC_Product_CSV_Exporter::get_column_value_backorders()protectedWC 3.1.0

Get backorders.

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

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_column_value_backorders( $product );
$product(WC_Product) (обязательный)
Product being exported.

Список изменений

С версии 3.1.0 Введена.

Код WC_Product_CSV_Exporter::get_column_value_backorders() WC 8.7.0

protected function get_column_value_backorders( $product ) {
	$backorders = $product->get_backorders( 'edit' );

	switch ( $backorders ) {
		case 'notify':
			return 'notify';
		default:
			return wc_string_to_bool( $backorders ) ? 1 : 0;
	}
}