mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Revert "move generating request id to separate method"
This reverts commit 8392f955
This commit is contained in:
parent
1283587f06
commit
371fe717b9
1 changed files with 1 additions and 10 deletions
|
@ -223,7 +223,7 @@ class OrderEndpoint {
|
|||
'body' => wp_json_encode( $data ),
|
||||
);
|
||||
|
||||
$paypal_request_id = $paypal_request_id ?: $this->generate_request_id();
|
||||
$paypal_request_id = $paypal_request_id ? $paypal_request_id : uniqid( 'ppcp-', true );
|
||||
$args['headers']['PayPal-Request-Id'] = $paypal_request_id;
|
||||
if ( $this->bn_code ) {
|
||||
$args['headers']['PayPal-Partner-Attribution-Id'] = $this->bn_code;
|
||||
|
@ -556,13 +556,4 @@ class OrderEndpoint {
|
|||
$new_order = $this->order( $order_to_update->id() );
|
||||
return $new_order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a new invoice id.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function generate_request_id(): string {
|
||||
return uniqid( 'ppcp-', true );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue