Add patch order data filter

This commit is contained in:
Alex P 2023-01-31 10:33:14 +02:00
parent 3336468f64
commit b4097f824c
No known key found for this signature in database
GPG key ID: 54487A734A204D71

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(