Check if array key exist before using it

This commit is contained in:
dinamiko 2021-07-21 11:44:44 +02:00
parent 16a48156a5
commit c2a036c952

View file

@ -174,7 +174,7 @@ class CreateOrderEndpoint implements EndpointInterface {
$this->set_bn_code( $data ); $this->set_bn_code( $data );
if ( 'checkout' === $data['context'] ) { 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 ); $this->process_checkout_form_when_creating_account( $data['form'], $wc_order );
} }