Skip to content
Advertisement

WooCommerce Show Product Total Sales after Custom a Date in Frontend

I want to show product total sales after custom date:

I have this code, but I would like to custom it for showing only the total sales after a custom date for example 05/26/2016

JavaScript

Advertisement

Answer

total_sales holds the total sales count of all time, So you need to write custom query to get sold count between specific date.

JavaScript

Code goes in functions.php file of your active child theme (or theme). Or also in any plugin php files.

USAGE

JavaScript

Please Note: All the date are in Y-m-d format.

Code is tested and works.

Hope this helps!

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement