Fix merge conflicts

This commit is contained in:
Emili Castells Guasch 2023-02-28 11:07:03 +01:00
commit c1d7d30f04
46 changed files with 1325 additions and 267 deletions

View file

@ -518,6 +518,11 @@ class OrderEndpoint {
}
}
/**
* The filter can be used to modify the order patching request body data (the final prices, items).
*/
$patches_array = apply_filters( 'ppcp_patch_order_request_body_data', $patches_array );
$bearer = $this->bearer->bearer();
$url = trailingslashit( $this->host ) . 'v2/checkout/orders/' . $order_to_update->id();
$args = array(

View file

@ -284,7 +284,14 @@ class PurchaseUnit {
$this->items()
),
);
if ( $ditch_items_when_mismatch && $this->ditch_items_when_mismatch( $this->amount(), ...$this->items() ) ) {
$ditch = $ditch_items_when_mismatch && $this->ditch_items_when_mismatch( $this->amount(), ...$this->items() );
/**
* The filter can be used to control when the items and totals breakdown are removed from PayPal order info.
*/
$ditch = apply_filters( 'ppcp_ditch_items_breakdown', $ditch, $this );
if ( $ditch ) {
unset( $purchase_unit['items'] );
unset( $purchase_unit['amount']['breakdown'] );
}