Skip to content

Commit

Permalink
Merge pull request #81 from luizbills/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
luizbills authored Sep 20, 2023
2 parents b84b9f2 + 1034412 commit 48ac55d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions classes/Integration/Autofill_Brazilian_Addresses.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function fill_package_destination ( $package ) {
$address = $this->get_address( $postcode );

if ( $address ) {
h::log( $package['destination'] );
$package['destination'] = [
'postcode' => $address['postcode'],
'address' => implode(
Expand All @@ -57,6 +56,7 @@ public function fill_package_destination ( $package ) {
$address['address_1'],
$address['address_2'],
$address['neighborhood'],
$address['city'],
] )
),
'address_1' => $address['address_1'],
Expand All @@ -65,7 +65,6 @@ public function fill_package_destination ( $package ) {
'state' => $address['state'],
'country' => 'BR',
];
h::log( $package['destination'] );
}

return $package;
Expand Down
2 changes: 1 addition & 1 deletion classes/Tweaks.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function update_customer_address ( $rates, $package ) {
h::get( $dest['city'] )
);
$customer->set_shipping_address_1( $dest['address_1'] ?? '' );
$customer->set_shipping_address_2( $dest['address_1'] ?? '' );
$customer->set_shipping_address_2( $dest['address_2'] ?? '' );

h::logger()->info( 'Customer shipping address updated to ' . wp_json_encode( $dest ) );

Expand Down
1 change: 0 additions & 1 deletion templates/shipping-simulator-form.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php extract( $args ); ?>
<section id="wc-shipping-sim" class="<?php echo esc_attr( $css_class ) ?>">
<?php do_action( 'wc_shipping_simulator_wrapper_start' ) ?>

Expand Down
1 change: 0 additions & 1 deletion templates/shipping-simulator-results.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php use Shipping_Simulator\Helpers as h; ?>
<?php extract( $args ); ?>

<?php if ( count( $rates ) > 0 ) : ?>
<?php do_action( 'wc_shipping_simulator_results_before', $data ) ?>
Expand Down

0 comments on commit 48ac55d

Please sign in to comment.