woocommerce_webshop_init

The WooCommerce Sisow Mastercard woocommerce webshop init function.

Description

woocommerce_webshop_init(); 

Usage

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

Defined (1)

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

/sisowwg.php  
  1. function woocommerce_webshop_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_webshop extends SisowBase 
  9. function __construct()  
  10. {  
  11. $this->paymentcode = 'webshop'; 
  12. $this->paymentname = 'Sisow Webshop Giftcard'; 
  13. $this->redirect = true; 
  14. parent::__construct(); 
  15.  
  16. public function get_icon() { 
  17. if($this->displaylogo == 'yes') 
  18. return '<img alt="'.$this->paymentname.'" title="" src="'.plugins_url() . "/" . plugin_basename( dirname(__FILE__)) . '/sisow/logo/'.$this->paymentcode.'.png'.'"'; 
  19.  
  20. public function payment_fields() { 
  21. $paymentfee_total = $this->getFee(); 
  22.  
  23. $text = ''; 
  24. if($this->merchantId == '' || $this->merchantKey == '') 
  25. $text .= '<b>Let op MerchantID/MerchantKey niet ingevuld, controleer de instellingen!</b></br>'; 
  26.  
  27. if($this->testmode == 'yes') 
  28. $text .= '<b>Let op Testmodus ingeschakeld!</b></br>'; 
  29.  
  30. if ($paymentfee_total > 0) { 
  31. $text .= '</br></br>  <b>' . $this->paymentfeelabel . ': ' . woocommerce_price($paymentfee_total) . '</b></br>'; 
  32. }  
  33.  
  34. echo wpautop(wptexturize($text)); 
  35.  
  36. add_filter('woocommerce_payment_gateways', 'add_sisow_webshop_gateway' ); 
  37.  
  38. function add_sisow_webshop_gateway($methods) 
  39. $temp = 'WC_Sisow_webshop'; 
  40. $methods[] = $temp; 
  41. return $methods;