Merge pull request #633 from woocommerce/pcp-615-invalid-address

Retry without shipping field when got invalid address error
This commit is contained in:
Emili Castells 2022-05-17 12:53:00 +02:00 committed by GitHub
commit 5cd439fa20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 8 deletions

View file

@ -175,6 +175,15 @@ class PurchaseUnit {
return $this->shipping;
}
/**
* Sets shipping info.
*
* @param Shipping|null $shipping The value to set.
*/
public function set_shipping( ?Shipping $shipping ): void {
$this->shipping = $shipping;
}
/**
* Returns the reference id.
*

View file

@ -119,4 +119,13 @@ class PayPalApiException extends RuntimeException {
public function issues(): array {
return $this->response->issues ?? array();
}
/**
* The HTTP status code.
*
* @return int
*/
public function status_code(): int {
return $this->status_code;
}
}