fnwc_gateway_saferpay_plugins_loaded

The WooCommerce Payment Gateway for Saferpay fnwc gateway saferpay plugins loaded function.

Description

fnwc_gateway_saferpay_plugins_loaded(); 

Usage

  1. if ( !function_exists( 'fnwc_gateway_saferpay_plugins_loaded' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-payment-gateway-for-saferpay/fn-plugin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = fnwc_gateway_saferpay_plugins_loaded(); 
  7.  

Defined (1)

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

/fn-plugin.php  
  1. function fnwc_gateway_saferpay_plugins_loaded() { 
  2.  
  3. global $woocommerce; 
  4.  
  5. /** Load plugin language files */ 
  6. load_plugin_textdomain( 'fnwc-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );  
  7.  
  8.  
  9. /***************************************************************** 
  10. * Preflight check 
  11. *****************************************************************/  
  12.  
  13. // Load utility 
  14. require_once("fn-utilities.php"); 
  15.  
  16. // Is curl installed? 
  17. if (!function_exists('curl_version')) 
  18. return; 
  19. // Is WooCommerce installed and the Gateway class present? 
  20. if (!class_exists('WC_Payment_Gateway')) 
  21. return; 
  22.  
  23. if(!version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' )) 
  24. return;  
  25.  
  26. /***************************************************************** 
  27. * Take off 
  28. *****************************************************************/ 
  29.  
  30. // Load the class 
  31. require_once("class-fnwc-gateway-saferpay.php"); 
  32.  
  33. // Add Saferpay as WooCommerce gateway (WooCommerce takes care of the rest) 
  34.  
  35. // Short codes 
  36. add_shortcode('saferpay-checkout', 'sc_saferpay_checkout'); 
  37.  
  38.