コード例 #1
0
 public function __construct()
 {
     $this->id = WC_Edostavka::get_method_id();
     $this->dateExecute = current_time('mysql');
     if (class_exists('WC_Logger')) {
         $this->log = new WC_Logger();
     }
 }
コード例 #2
0
 public function __construct($instance_id = 0)
 {
     $this->id = WC_Edostavka::get_method_id();
     $this->instance_id = absint($instance_id);
     $this->method_title = __('Edostavka');
     $this->method_description = __('Расчёт стоимости доставки СДЭК');
     $this->supports = array('shipping-zones', 'instance-settings');
     $this->init();
 }
コード例 #3
0
 public function __construct()
 {
     $this->id = WC_Edostavka::get_method_id();
     $this->method_title = __('Edostavka');
     $this->method_description = __('Расчёт стоимости доставки СДЭК');
     $this->init_form_fields();
     $this->init_settings();
     $this->enabled = $this->get_option('enabled');
     $this->title = $this->get_option('title');
     $this->display_date = $this->get_option('display_date');
     $this->additional_time = $this->get_option('additional_time');
     $this->fee = $this->get_option('fee');
     $this->city_origin = $this->get_option('city_origin');
     $this->notice_text = $this->get_option('notice_text');
     $this->error_text = $this->get_option('error_text');
     $this->show_error = $this->get_option('show_error');
     $this->show_notice = $this->get_option('show_notice');
     $this->enabled_in_cart = $this->get_option('enabled_in_cart');
     $this->corporate_service = $this->get_option('corporate_service');
     $this->hide_standart_wc_city = $this->get_option('hide_standart_wc_city');
     $this->autoselect_edostavka_shipping_method = $this->get_option('autoselect_edostavka_shipping_method');
     $this->replace_shipping_label_door = $this->get_option('replace_shipping_label_door');
     $this->shipping_label_door = $this->get_option('shipping_label_door');
     $this->replace_shipping_label_stock = $this->get_option('replace_shipping_label_stock');
     $this->shipping_label_stock = $this->get_option('shipping_label_stock');
     $this->login = $this->get_option('login');
     $this->password = $this->get_option('password');
     $this->minimum_weight = $this->get_option('minimum_weight');
     $this->minimum_height = $this->get_option('minimum_height');
     $this->minimum_width = $this->get_option('minimum_width');
     $this->minimum_length = $this->get_option('minimum_length');
     $this->debug = $this->get_option('debug');
     $this->countries = apply_filters('woocommerce_edostavka_countries', $this->get_option('countries'));
     $this->availability = $this->get_option('availability');
     $this->availability = 'specific';
     add_action('woocommerce_update_options_shipping_' . $this->id, array($this, 'process_admin_options'));
     if ('yes' == $this->debug) {
         $this->log = WC_Edostavka::logger();
     }
 }