WC_Product_CSV_Exporter::get_column_value_backorders()protectedWC 3.1.0

Get backorders.

Method of the class: WC_Product_CSV_Exporter{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_column_value_backorders( $product );
$product(WC_Product) (required)
Product being exported.

Changelog

Since 3.1.0 Introduced.

WC_Product_CSV_Exporter::get_column_value_backorders() code WC 9.3.3

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