WC_Product_CSV_Exporter::get_column_value_images( WC_Product $product )

Get images value.


Description Description


Parameters Parameters

$product

(Required) Product being exported.


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	protected function get_column_value_images( $product ) {
		$image_ids = array_merge( array( $product->get_image_id( 'edit' ) ), $product->get_gallery_image_ids( 'edit' ) );
		$images    = array();

		foreach ( $image_ids as $image_id ) {
			$image = wp_get_attachment_image_src( $image_id, 'full' );

			if ( $image ) {
				$images[] = $image[0];
			}
		}

		return $this->implode_values( $images );
	}

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.