add_globalpay_requery_button

The Woocommerce GlobalPay add globalpay requery button function.

Description

add_globalpay_requery_button( $actions, $the_order ); 

Parameters (2)

0. $actions
The actions.
1. $the_order
The order.

Usage

  1. if ( !function_exists( 'add_globalpay_requery_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-globalpay/woocommerce-globalpay.php'; 
  3.  
  4. // The actions. 
  5. $actions = null; 
  6.  
  7. // The order. 
  8. $the_order = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = add_globalpay_requery_button($actions, $the_order); 
  12.  

Defined (1)

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

/woocommerce-globalpay.php  
  1. function add_globalpay_requery_button ($actions, $the_order) { 
  2. // Do this only for GlobalPay-based payments that are not successful. 
  3. $wc_globalpay = new WC_GlobalPay(); 
  4. if ($the_order->payment_method != $wc_globalpay->id 
  5. || $the_order->status == 'processing' 
  6. || $the_order->status == 'completed') { 
  7. return $actions; 
  8.  
  9. $actions['requery'] = array( 
  10. 'url' => '#',  
  11. 'name' => __('Update order ' . $the_order->id, 'woocommerce-globalpay'),  
  12. 'action' => 'icon-wooglobalpay-webfont' 
  13. ); 
  14.  
  15. return $actions;