WC_Product_CSV_Exporter::get_column_value_published( WC_Product $product )

Get published value.


Description Description


Parameters Parameters

$product

(Required) Product being exported.


Top ↑

Return Return

(int)


Top ↑

Source Source

File: includes/export/class-wc-product-csv-exporter.php

	protected function get_column_value_published( $product ) {
		$statuses = array(
			'draft'   => -1,
			'private' => 0,
			'publish' => 1,
		);

		$status = $product->get_status( 'edit' );

		return isset( $statuses[ $status ] ) ? $statuses[ $status ] : -1;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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