mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Add payment method to create order request body data filter
This commit is contained in:
parent
d0e7200669
commit
687b56d8c0
4 changed files with 12 additions and 11 deletions
|
@ -219,14 +219,11 @@ class OrderEndpoint {
|
|||
if ( $payment_token ) {
|
||||
$data['payment_source']['token'] = $payment_token->to_array();
|
||||
}
|
||||
if ( $payment_method ) {
|
||||
$data['payment_method'] = $payment_method;
|
||||
}
|
||||
|
||||
/**
|
||||
* The filter can be used to modify the order creation request body data.
|
||||
*/
|
||||
$data = apply_filters( 'ppcp_create_order_request_body_data', $data );
|
||||
$data = apply_filters( 'ppcp_create_order_request_body_data', $data, $payment_method );
|
||||
$url = trailingslashit( $this->host ) . 'v2/checkout/orders';
|
||||
$args = array(
|
||||
'method' => 'POST',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue