From c2a036c952568a447baeb1a442805f911e9fc7e9 Mon Sep 17 00:00:00 2001 From: dinamiko Date: Wed, 21 Jul 2021 11:44:44 +0200 Subject: [PATCH] Check if array key exist before using it --- modules/ppcp-button/src/Endpoint/class-createorderendpoint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php b/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php index cadc0e0fd..0e90fc41c 100644 --- a/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php +++ b/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php @@ -174,7 +174,7 @@ class CreateOrderEndpoint implements EndpointInterface { $this->set_bn_code( $data ); if ( 'checkout' === $data['context'] ) { - if ( '1' === $data['createaccount'] ) { + if ( isset( $data['createaccount'] ) && '1' === $data['createaccount'] ) { $this->process_checkout_form_when_creating_account( $data['form'], $wc_order ); }