fn_log_for_order

Get content of log for order.

Description

(string) fn_log_for_order( $orderid ); 

Returns (string)

- returns the content of the response from Saferpay

Parameters (1)

0. $orderid
The orderid.

Usage

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

Defined (1)

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

/fn-saferpay.php  
  1. function fn_log_for_order($orderid) 
  2. $file = plugin_dir_path( __FILE__ ) . "errors/" . $orderid . ".log"; 
  3.  
  4. if(file_exists($file)) 
  5. return file_get_contents($file); 
  6.  
  7. return "";