<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>WC()-&gt;cart-&gt;total sums BOGO items at regular prince instead of 0

Replies: 2

So I’m trying to force a field to be required if the cart total is over a set amount, and I noticed it always came out as the sum of the items + the free items from “Buy 5 get 2 free” I set with adp
I tried to create a function to calculate the cart total by summing each item’s price, and while it correctly identifies the sale price of the 5 chosen items it doesn’t identify the 100% discount from adp’s 2 free items.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer