Revert "better check if request id is empty"

This reverts commit 8ba75230
This commit is contained in:
Kirill Braslavsky 2021-04-06 12:57:07 +03:00
parent 4b31b443fa
commit 1283587f06

View file

@ -223,8 +223,7 @@ class OrderEndpoint {
'body' => wp_json_encode( $data ), 'body' => wp_json_encode( $data ),
); );
$paypal_request_id = '' === $paypal_request_id ? $this->generate_request_id() : $paypal_request_id; $paypal_request_id = $paypal_request_id ?: $this->generate_request_id();
$args['headers']['PayPal-Request-Id'] = $paypal_request_id; $args['headers']['PayPal-Request-Id'] = $paypal_request_id;
if ( $this->bn_code ) { if ( $this->bn_code ) {
$args['headers']['PayPal-Partner-Attribution-Id'] = $this->bn_code; $args['headers']['PayPal-Partner-Attribution-Id'] = $this->bn_code;