Hello,
I am developing a custom WooCommerce plugin and I need some technical information about how the xStore built-in Quantity Discounts module applies discounts internally.
Specifically, I need to know:
1. Which WordPress/WooCommerce filter or action hook does xStore use to apply the quantity discount to the cart item price? For example, does it use woocommerce_before_calculate_totals, woocommerce_product_get_price, or something custom?
2. At what hook priority does xStore run this discount logic?
3. Does xStore write the discounted price directly into the cart_contents array (e.g. line_total, line_subtotal, or cart_item[‘data’]->price), or does it use a different mechanism?
4. Is there an official way to exclude a specific product from xStore quantity discounts — for example, a product meta key, a CSS class, or a filter hook I can use in my plugin?
Context: I have certain “deposit” products in the cart (hidden simple products, VAT exempt) whose price must never be discounted under any circumstances. I need to exclude them from xStore’s quantity discount calculation at the source, not just override the displayed price afterward.
Thank you very much!