WC_POS_Admin_Settings_Gateways

Gateway Settings Class.

Defined (1)

The class is defined in the following location(s).

/includes/admin/settings/class-wc-pos-gateways.php  
  1. class WC_POS_Admin_Settings_Gateways extends WC_POS_Admin_Settings_Abstract { 
  2.  
  3. // note: should be init as new, not Singleton 
  4. // protected static $instance; 
  5.  
  6. /** 
  7. * @param $gateway_id 
  8. */ 
  9. public function __construct($gateway_id) { 
  10. $this->id = 'gateway_'.$gateway_id; 
  11. $this->defaults = array( 
  12. 'icon' => true 
  13. ); 
  14.  
  15. /** 
  16. * @param WC_Payment_Gateway $gateway 
  17. */ 
  18. public function merge_settings(WC_Payment_Gateway $gateway) { 
  19. $data = $this->get(); 
  20. if(isset($data['title'])) { 
  21. $gateway->title = $data['title']; 
  22. if(isset($data['description'])) { 
  23. $gateway->description = $data['description']; 
  24. $gateway->has_icon = $gateway->get_icon() != ''; 
  25. $gateway->show_icon = isset($data['icon']) ? $data['icon']: true ; 
  26.