Call parent constructor before methods

This commit is contained in:
Mészáros Róbert 2020-04-13 17:47:08 +03:00
parent 292e48942e
commit 647a0f3c32

View file

@ -29,7 +29,6 @@ class WcGateway extends WcGatewayBase implements WcGatewayInterface
OrderFactory $orderFactory,
SettingsFields $settingsFields
) {
$this->sessionHandler = $sessionHandler;
$this->cartRepository = $cartRepository;
$this->endpoint = $endpoint;
@ -42,6 +41,8 @@ class WcGateway extends WcGatewayBase implements WcGatewayInterface
'woocommerce-paypal-gateway'
);
parent::__construct();
$this->title = $this->get_option('title');
$this->description = $this->get_option('description');
@ -55,8 +56,6 @@ class WcGateway extends WcGatewayBase implements WcGatewayInterface
'process_admin_options',
]
);
parent::__construct();
}
public function init_form_fields()