Skip to content

Commit

Permalink
PLGWOOS-961: Add double-check before addDelivery() (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcivit authored Nov 4, 2024
1 parent 8e53a4c commit 05f3d5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function create_order_request( WC_Order $order, string $gateway_code, str
->addSecondChance( ( new SecondChance() )->addSendEmail( (bool) get_option( 'multisafepay_second_chance', false ) ) )
->addData( array( 'var2' => $order->get_id() ) );

if ( $order->needs_shipping_address() ) {
if ( $order->needs_shipping_address() && $order->has_shipping_address() ) {
$order_request->addDelivery( $this->customer_service->create_delivery_details( $order ) );
}

Expand Down

0 comments on commit 05f3d5b

Please sign in to comment.