Custom cart notice based on user total purchased amount in Woocommerce
问题 I am trying to display a custom cart notice based on user total purchased amount in Woocommerce, based on this answer code: Add a percentage discount based on customer total purchases sum in Woocommerce It does not work as I would like. For example if a customer has made 2 orders: First order is 200 Second order is 122 So the total sum is 200 + 122 = 322. But I get a total of 200. What I am doing wrong? This is the code that I use: add_action( 'woocommerce_before_cart', 'vc' ); function vc( )