WC_Payment_Gateway::init_settings PHP Method

init_settings() public method

Init settings for gateways.
public init_settings ( )
    public function init_settings()
    {
        parent::init_settings();
        $this->enabled = !empty($this->settings['enabled']) && 'yes' === $this->settings['enabled'] ? 'yes' : 'no';
    }

Usage Example

 public function init_settings()
 {
     parent::init_settings();
     $options_to_import = array('iamport_user_code', 'iamport_rest_key', 'iamport_rest_secret', 'checkout_methods');
     foreach ($options_to_import as $key) {
         $this->settings[$key] = wskl_get_option($key);
     }
     $this->settings['enabled'] = wskl_yes_or_no(wskl_is_option_enabled('enable_sym_pg') && wskl_get_option('pg_agency') == 'iamport' && in_array($this->checkout_method, $this->settings['checkout_methods']));
 }
All Usage Examples Of WC_Payment_Gateway::init_settings