I'm displaying the total sales using get_total_sales() WC_Product method, in a product table of my WooCommerce store.
However this number doesn't get updated after an user cancel its order, it keeps adding sales.
Anybody can show me how to change this get_total_sales formula, to be able to remove the canceled ordered numbers in the total sales?