mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Merge trunk
This commit is contained in:
commit
aa1942b604
30 changed files with 589 additions and 48 deletions
|
@ -71,6 +71,8 @@ class ChangeCartEndpoint extends AbstractCartEndpoint {
|
|||
* @throws Exception On error.
|
||||
*/
|
||||
protected function handle_data(): bool {
|
||||
$data = $this->request_data->read_request( $this->nonce() );
|
||||
|
||||
$this->cart_products->set_cart( $this->cart );
|
||||
|
||||
$products = $this->products_from_request();
|
||||
|
@ -79,7 +81,9 @@ class ChangeCartEndpoint extends AbstractCartEndpoint {
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->shipping->reset_shipping();
|
||||
if ( ! ( $data['keepShipping'] ?? false ) ) {
|
||||
$this->shipping->reset_shipping();
|
||||
}
|
||||
|
||||
if ( ! $this->add_products( $products ) ) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue