mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Patch the order with no shipping methods, instead of throwing an error
This commit is contained in:
parent
8b5165ddfc
commit
694caac891
1 changed files with 0 additions and 9 deletions
|
@ -97,15 +97,6 @@ class UpdateShippingEndpoint implements EndpointInterface {
|
|||
$pu = $this->purchase_unit_factory->from_wc_cart( null, true );
|
||||
$pu_data = $pu->to_array();
|
||||
|
||||
if ( ! isset( $pu_data['shipping']['options'] ) ) {
|
||||
wp_send_json_error(
|
||||
array(
|
||||
'message' => 'No shipping methods.',
|
||||
)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: maybe should patch only if methods changed.
|
||||
// But it seems a bit difficult to detect,
|
||||
// e.g. ->order($id) may not have Shipping because we drop it when address or name are missing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue