woocommerce_paypalec_init

The WooCommerce Sisow Mastercard woocommerce paypalec init function.

Description

woocommerce_paypalec_init(); 

Usage

  1. if ( !function_exists( 'woocommerce_paypalec_init' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-sisow-mastercard/sisowpp.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woocommerce_paypalec_init(); 
  7.  

Defined (1)

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

/sisowpp.php  
  1. function woocommerce_paypalec_init()  
  2. {  
  3. if ( ! class_exists( 'WC_Payment_Gateway' ) ) { return; } 
  4.  
  5. require_once(WP_PLUGIN_DIR . "/" . plugin_basename( dirname(__FILE__)) . '/sisow/sisow.cls5.php'); 
  6. require_once(WP_PLUGIN_DIR . "/" . plugin_basename( dirname(__FILE__)) . '/sisow/base.php'); 
  7.  
  8. class WC_Sisow_paypalec extends SisowBase 
  9.  
  10. function __construct()  
  11. {  
  12. $this->paymentcode = 'paypalec'; 
  13. $this->paymentname = 'Sisow PayPal'; 
  14. $this->redirect = true; 
  15. parent::__construct(); 
  16.  
  17. public function get_icon() { 
  18. if($this->displaylogo == 'yes') 
  19. return '<img alt="'.$this->paymentname.'" title="" src="'.plugins_url() . "/" . plugin_basename( dirname(__FILE__)) . '/sisow/logo/'.$this->paymentcode.'.png'.'"'; 
  20.  
  21. public function payment_fields() { 
  22. $paymentfee_total = $this->getFee(); 
  23.  
  24. $text = '<b>'.__('Betalen met', sisow) . ' ' . $this->title . '</b>'; 
  25. if($this->merchantId == '' || $this->merchantKey == '') 
  26. $text .= '<br/><b>Let op MerchantID/MerchantKey niet ingevuld, controleer de instellingen!</b>'; 
  27.  
  28. if($this->testmode == 'yes') 
  29. $text .= '<br/><b>Let op Testmodus ingeschakeld!</b>'; 
  30.  
  31. if ($paymentfee_total > 0) { 
  32. $text .= '<br/><b>' . $this->paymentfeelabel . woocommerce_price($paymentfee_total) . '</b>'; 
  33. }  
  34.  
  35. echo wpautop(wptexturize($text)); 
  36.  
  37. add_filter('woocommerce_payment_gateways', 'add_sisow_paypalec_gateway' ); 
  38.  
  39. function add_sisow_paypalec_gateway($methods) 
  40. $temp = 'WC_Sisow_paypalec'; 
  41. $methods[] = $temp; 
  42. return $methods;