Skip to content

Commit

Permalink
fix: update billing address retrieval to use WC_Order methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiano-mallmann authored Jan 7, 2025
2 parents f9ec565 + 689a099 commit c1b8a91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Helper/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ public static function build_customer_address_from_order(Order $order)
'complement' => substr($order->getWcOrder()->get_billing_address_2(), 0, 64),
'zip_code' => preg_replace('/[^\d]+/', '', $order->getWcOrder()->get_billing_postcode()),
'neighborhood' => substr($order->get_meta('billing_neighborhood'), 0, 64),
'city' => substr($order->get_meta('billing_city'), 0, 64),
'state' => substr($order->get_meta('billing_state'), 0, 2),
'city' => substr($order->getWcOrder()->get_billing_city(), 0, 64),
'state' => substr($order->getWcOrder()->get_billing_state(), 0, 2),
'country' => 'BR'
);
}
Expand Down Expand Up @@ -533,7 +533,7 @@ public static function build_customer_phones_from_order(Order $order)
{

$phones = array();
$phone = $order->get_meta('billing_phone');
$phone = $order->getWcOrder()->get_billing_phone();
$cellphone = $order->get_meta('billing_cellphone');

if ($phone) {
Expand Down

0 comments on commit c1b8a91

Please sign in to comment.