Analytics – Sub-orders/Child Orders
-
Hello there,
Thank you once more for this great plugin. The problem is simply that sub-orders/child-orders show in Woocommerce Analytics along with their parent order which double the amount of the actual sales.
Example:
Joe sells chips for 5$
Toni sells Pepsi 5$If a customer buys 1xChips and 1xPepsi, 3 orders will be created as follows:
-Main order: this is mainly a place holder for the child/sub orders with a total value of 8$
-Sub-order 1: this is the chips order for 5$
-Sub-order 2: this is the pepsi order for 3$Now here’s the problem, this works flawlessly in everything EXCEPT analytics, in analytics the order value is doubled as it will show the main order AND the suborders, so in analytics this 8$ order will show 3 times, once as a 8$ total order and once as a 5$ chips order and the last time as a 3$ pepsi order. Bringing up the total to 16$ which is double the correct/real value.
Example:
https://www.upload.ee/image/11928278/woo2.pngThis is supposed to be one order which is #11112. Orders #11113 and #11114 are sub-orders and are ordered calculated in #11112 but with the current way analytics work they are being counted twice, once collectively as part of main order and once individually doubling the totals.
Any code snippet to counter this?
I’m also comfortable editing core files if you can direct me to the files to edit.
- The topic ‘Analytics – Sub-orders/Child Orders’ is closed to new replies.