Craig Cooper
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Bulk Discount] Price rounding issues in paypalOk, so I dug into the code and I found this at line 366:
$row_base_price = $_product->get_price() * $this->discount_coeffs[$this->get_actual_id( $_product )]['coeff'];I changed it to this:
$row_base_price = round($_product->get_price() * $this->discount_coeffs[$this->get_actual_id( $_product )]['coeff'],2);And now the prices are rounded BEFORE they are calculated. So if your price is 0.7525 or something similar after the discount is calculated it is rounded to two decimal places (standard for many currencies) before it is multiplied by the quantity for the subtotal.
So the discount is technically less precise but it means you can actually checkout with Paypal.
Forum: Plugins
In reply to: [WooCommerce Bulk Discount] Price rounding issues in paypalI’d be happy to modify the code myself if I knew where to add the code to round the figure .
Forum: Plugins
In reply to: [WooCommerce Bulk Discount] Price rounding issues in paypalI’m getting this very same error.
I think if we could round the amount at the point of discount it will solve the problem.
In my case I have 0.85 with a 15% discount which is 0.7225.
Unfortunately paypal receives 0.72 and so with any quantity greater than 4 there is a mismatch in paypal’s calculation of the amount and WooCommerce’s.
Forum: Plugins
In reply to: [PayPal for WooCommerce] Not redirecting on paymentIt was with Payments Pro.
I thought it was W3 Total Cache.
But it seems it was in fact Inbound Extension – WooCommerce Integration, a bought plugin from InboundNow.
Forum: Fixing WordPress
In reply to: Automatically inserting code breaking linksDo you have the GoSquared tracking code plugin? Or is it built into the theme?