WPIntell

Source evidence

Quantity rounding issue when applying coupon in WooCommerce

Unit Price for WooCommerce · support · 2026-03-19T15:39:00+00:00

complaintsentiment
highseverity
0.8relevance
0replies
Evidence onlycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 1 rows with source links

100.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

0 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
ceciestmonsurnom unresolved
Hi Condless team, I’m using the Unit Price for WooCommerce plugin on a WooCommerce store where some products are sold by meters with decimal quantities (e.g., 2.5 m). I have configured a minimum quantity and step correctly, and the quantity displays correctly on the product page and when adding to cart. Problem: When a customer applies a coupon, the cart updates automatically, and the quantity is rounded down to the nearest integer (e.g., 2.5 m becomes 2 m). This causes incorrect pricing and prevents customers from ordering the exact quantity. I’m currently using the following hooks in my functions.php : add_filter( ‘upw_skip_args_validation’, ‘__return_true’ ); add_filter( ‘upw_product_min_value’, ‘upw_set_min_value’ ); add_filter( ‘upw_variation_min_qty’, ‘upw_set_min_value’ ); add_filter( ‘woocommerce_update_cart_validation’, ‘upw_apply_min_quantity’, 10, 4 ); I suspect the issue occurs because WooCommerce recalculates cart quantities when a coupon is applied, and decimal quantities are rounded during this process. Could you advise on the correct way to preserve decimal quantities when the cart updates (especially after applying coupons)? Thank you in advance for your help! Best regards,

Comments

0 shown

No comments were stored for this source.