/** * Initialize Registered Letter. */ public function __construct() { $this->id = 'correios_registered_letter'; $this->method_title = __('Registered Letter', 'woocommerce-correios'); $this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/carta-comercial'; /** * 10014 - Registered Letter. */ $this->code = '10014'; parent::__construct(); }
/** * Initialize SEDEX 10. */ public function __construct() { $this->id = 'correios_sedex10'; $this->method_title = __('SEDEX 10', 'woocommerce-correios'); $this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/sedex-10'; /** * 40215 - SEDEX 10 without contract. */ $this->code = '40215'; parent::__construct(); }
/** * Initialize SEDEX. */ public function __construct() { $this->id = 'correios_sedex'; $this->method_title = __('SEDEX', 'woocommerce-correios'); $this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/sedex'; /** * 40010 - SEDEX without contract. * 40096 - SEDEX with contract. */ $this->code = $this->is_corporate() ? '40096' : '40010'; parent::__construct(); }
/** * Initialize PAC. */ public function __construct() { $this->id = 'correios_pac'; $this->method_title = __('PAC', 'woocommerce-correios'); $this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/pac-encomenda-economica'; /** * 41106 - PAC without contract. * 41068 - PAC with contract. */ $this->code = $this->is_corporate() ? '41068' : '41106'; parent::__construct(); }
/** * Correios options page. */ public function admin_options() { if ($this->is_corporate()) { parent::admin_options(); } else { $GLOBALS['hide_save_button'] = true; echo '<h3>' . esc_html($this->method_title) . '</h3>'; echo '<p>'; esc_html_e('e-Sedex only works on corporate mode. Enable this options by setting "Corporate" in the "Service Type" option in', 'woocommerce-correios'); echo ' <a href="' . esc_url(admin_url('admin.php?page=wc-settings&tab=integration§ion=correios')) . '">' . esc_html__('Correios settings screen.', 'woocommerce-correios') . '</a>'; echo '</p>'; } }