woocommerce-paypal-payments/modules/ppcp-api-client
Narek Zakarian 52e439838a
fix(api-client): normalize fractional WC quantities below 1 to a single unit
WooCommerce allows fractional cart/order quantities (e.g. 0.3, via
plugins like Measurement Price Calculator), which ItemFactory truncated
via (int) cast to 0. PayPal's API requires quantity >= 1 and rejects 0
with INVALID_PARAMETER_SYNTAX, failing checkout entirely. For
quantities between 0 and 1, normalize to a single PayPal unit priced at
the full line subtotal (and re-derive unit tax accordingly) instead of
truncating the quantity away. Quantities >= 1 are unaffected.
2026-07-15 14:23:43 +04:00
..
src fix(api-client): normalize fractional WC quantities below 1 to a single unit 2026-07-15 14:23:43 +04:00
composer.json Remove dhii deps in modules 2026-02-18 15:47:44 +02:00
factories.php Migrate ppcp-api-client wc-gateway.settings to SettingsProvider 2025-12-16 15:14:21 +04:00
module.php Refactor some modules to native modularity support. 2023-12-15 14:16:53 +00:00
services.php Map subtotal adjustment setting to sanitizer mode so Add a correction works 2026-06-05 16:12:11 +02:00