最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Woocommerce - get daily sales meta

programmeradmin2浏览0评论

I am writing custom woocommerce plugin.

Does woocommerce has any daily sales report of each product?

I know, that get_post_meta can show total sales of certain product, but I need to show sales of each product each day. So for example - Product A was bought 37 times at 27-03-2020, and then, I need to retrive this data .

No idea how to do it, maybe somehow with ACF update_field function? /

Thanks,

Wojtek

I am writing custom woocommerce plugin.

Does woocommerce has any daily sales report of each product?

I know, that get_post_meta can show total sales of certain product, but I need to show sales of each product each day. So for example - Product A was bought 37 times at 27-03-2020, and then, I need to retrive this data .

No idea how to do it, maybe somehow with ACF update_field function? https://www.advancedcustomfields/resources/update_field/

Thanks,

Wojtek

Share Improve this question asked Mar 27, 2020 at 17:17 SlingySlingy 311 silver badge5 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The question that you posted is unfortunately not all that specific but take a look at Woocommerce analytics.

Otherwise there are 2 ways to do this on your own. 1. Query all the orders for day X and count the qty of a specific product. 2. Update the products sold after each purchase. Perhaps to a custom db table or somewhere else

发布评论

评论列表(0)

  1. 暂无评论