Skip to content

Commit 08da15f

Browse files
committed
Fixed: revenue higher than 999 was sent to the API incorrectly, due to incorrect number formatting.
1 parent c2ad4c1 commit 08da15f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Integrations/EDD.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ public function track_entered_checkout() {
160160
$props = apply_filters(
161161
'plausible_analytics_edd_entered_checkout_custom_properties',
162162
[
163+
// @todo Add cart contents
163164
'subtotal' => edd_get_cart_subtotal(),
164165
'tax' => edd_get_cart_tax(),
165166
'total' => edd_get_cart_total(),
@@ -184,7 +185,7 @@ public function track_purchase( $order_id, $payment ) {
184185
'plausible_analytics_edd_purchase_custom_properties',
185186
[
186187
'revenue' => [
187-
'amount' => number_format( (float) $payment->total, 2 ),
188+
'amount' => $payment->total,
188189
'currency' => $payment->currency,
189190
],
190191
]

0 commit comments

Comments
 (0)