• Hello,
    thanks for great plugin.
    When we export the order sheet.
    Now the products print out separately like item#1, item#2, item#3 …
    However, I wonder whether we can have the ordered products in same column?

    thank you

Viewing 1 replies (of 1 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    Could you open section “Misc Settings” and paste following code?
    thanks, Alex

    add_filter( "woe_fetch_order_products", function( $products, $order, $labels, $format, $static_vals ) {
    	$new_product = array();
    	// merge all cells 
    	foreach($products as $product) {
    		foreach( $product as $k=>$v) {
    			if(!isset($new_product[$k]))
    				$new_product[$k] = array();
    			$new_product[$k][] = $v;	
    		}
    	}
    	
    	//convent arrays to string 
    	foreach( $new_product as $k=>$v) {
    		$new_product[$k] = join(", ", array_filter($v) );
    	}	
    	return array( $new_product );  // as single product 
    },10, 5);
Viewing 1 replies (of 1 total)
  • The topic ‘products in same column’ is closed to new replies.