Removed duplicated nonce validation

This commit is contained in:
Pedro Silva 2023-10-16 15:46:26 +01:00
parent b38658aeeb
commit 5233e9caf6
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -69,16 +69,6 @@ class UpdatePaymentDataEndpoint {
try {
$data = $this->request_data->read_request( $this->nonce() );
// Validate nonce.
if (
! isset( $data['nonce'] )
|| ! wp_verify_nonce( $data['nonce'], self::nonce() )
) {
throw new RuntimeException(
__( 'Could not validate nonce.', 'woocommerce-paypal-payments' )
);
}
// Validate payment data.
if ( ! isset( $data['paymentData'] ) ) {
throw new RuntimeException(