+function custom_woo_ce_order_items_individual_output( $output, $order, $order_item ) {
+ if( !empty( $order->order_items ) ) {
+ // Check the Order Item has a Product ID
+ if( !empty( $order_item->product_id ) ) {
+ // Multiply the Order Item by the Quantity value
+ if( !empty( $order_item->quantity ) ) {
+ $size = $order_item->quantity;
+ for( $i = 1; $i < $size; $i++ ) {
+ $order_temp = (object)(array)$order;
+ $output[] = apply_filters( 'woo_ce_order_items_individual', $order_temp, $order_item );
+add_filter( 'woo_ce_order_items_individual_output', 'custom_woo_ce_order_items_individual_output', 10, 3 );
+function custom_woo_ce_order_items_individual_output_end( $output, $order ) {
+ $size = count( $output );
+ for( $i = 0; $i < $size; $i++ ) {
+ $output[$i]->order_items_quantity = 1;
+add_filter( 'woo_ce_order_items_individual_output_end', 'custom_woo_ce_order_items_individual_output_end', 10, 2 );