Skip to content

Commit

Permalink
PT-560 minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
tikohov20 committed Jun 27, 2024
1 parent fdd5b44 commit 5f08cc6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Mondu/Mondu/Support/OrderData.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,13 @@ public static function order_data_from_wc_order( WC_Order $order ) {
$billing_zip_code = $order->get_billing_postcode();
$billing_country_code = $order->get_billing_country();

/**
* @since 3.0.2
*
* Can be used to include any additional costs that are not included by default.
*/
$buyer_fee_cents = apply_filters('mondu_buyer_fee_cents', 0, $order);

$order_data = [
'payment_method' => array_flip( Plugin::PAYMENT_METHODS )[ $order->get_payment_method() ],
'currency' => get_woocommerce_currency(),
'external_reference_id' => (string) $order->get_order_number(),
'gross_amount_cents' => round( (float) $order->get_total() * 100),
'net_price_cents' => round( (float) $order->get_subtotal() * 100),
'tax_cents' => round( (float) $order->get_total_tax() * 100),
'buyer_fee_cents' => $buyer_fee_cents,
'buyer' => [
'first_name' => isset($billing_first_name) && Helper::not_null_or_empty($billing_first_name) ? $billing_first_name : null,
'last_name' => isset($billing_last_name) && Helper::not_null_or_empty($billing_last_name) ? $billing_last_name : null,
Expand Down

0 comments on commit 5f08cc6

Please sign in to comment.