Solve PHP warnings and improve performance
-
Congrats for the plugin and the good fees you guys have! 🙂
In some files, in new WordPress function, the plugin cause a PHP warning slowing down performance, this is the solution to be set in some files:
public function __construct()
{
/*$this->id = 'integration_rede_pix';
$this->title = 'Integration Rede Pix';
$this->has_fields = true;
$this->method_title = esc_attr__('Pay with the Rede Pix FREE', 'woo-rede');
$this->method_description = esc_attr__('Enables and configures payments with Rede Pix', 'woo-rede');
$this->supports = array(
'products',
'refunds',
);
// Define os campos de configuração do método de pagamento
$this->init_form_fields();
$this->init_settings();*/
add_action('init', array($this, 'initFunctions'));
// Define as configurações do método de pagamento
$this->title = $this->get_option('title');
$this->log = $this->get_logger();
$this->debug = $this->get_option('debug');
}
public function initFunctions() {
$this->id = 'integration_rede_pix';
$this->title = 'Integration Rede Pix';
$this->has_fields = true;
$this->method_title = esc_attr__('Pay with the Rede Pix FREE', 'woo-rede');
$this->method_description = esc_attr__('Enables and configures payments with Rede Pix', 'woo-rede');
$this->supports = array(
'products',
'refunds',
);
// Define os campos de configuração do método de pagamento
$this->init_form_fields();
$this->init_settings();
}Please, set that up in new versions. Thank you!
The topic ‘Solve PHP warnings and improve performance’ is closed to new replies.