WC_CSV_Exporter::is_column_exporting( string $column_id )

See if a column is to be exported or not.


Description Description


Parameters Parameters

$column_id

(Required) ID of the column being exported.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/export/abstract-wc-csv-exporter.php

	public function is_column_exporting( $column_id ) {
		$column_id         = strstr( $column_id, ':' ) ? current( explode( ':', $column_id ) ) : $column_id;
		$columns_to_export = $this->get_columns_to_export();

		if ( empty( $columns_to_export ) ) {
			return true;
		}

		if ( in_array( $column_id, $columns_to_export, true ) || 'meta' === $column_id ) {
			return true;
		}

		return false;
	}

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.