WC_Product_CSV_Exporter::get_column_value_images()
Get images value.
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_images( $product );
- $product(WC_Product) (required)
- Product being exported.
Changelog
Since 3.1.0 | Introduced. |
WC_Product_CSV_Exporter::get_column_value_images() WC Product CSV Exporter::get column value images code WC 9.4.2
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 ); }