Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(total_sales_count): the total sales for each product calculates twice when purchased from multiple vendor is fixed #249 #250

Merged
merged 1 commit into from
May 11, 2018

Conversation

saimonh3
Copy link
Contributor

The issue was when a sub order is created the total_sales count is increased by twice and when the order status is changed to on-hold, processing or completed, the total_sales count again increased by twice.

Reason: When there is a change of order status WooCommerce does update 'total_sales' post meta by order quantity and also keep track whether it has been recorded into database or not by using '_recorded_sales' post meta.

In dokan when an order is placed with products from multi-vendors it creates sub-orders. WooCommerce updates the 'total_sales' post meta for the parent order only and when there is a change of order status of sub order it does update 'total_sales' post meta again cause it didn't update 'total_sales' and '_recorded_sales' post meta.

@sabbir1991 sabbir1991 merged commit 7f4c20a into getdokan:develop May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants