umf_order_actions

The WooCommerce Upload My File umf order actions function.

Description

umf_order_actions( $actions, $order ); 

Parameters (2)

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

Usage

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

Defined (1)

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

/inc/umf-funct.php  
  1. function umf_order_actions($actions, $order) { 
  2.  
  3. if(check_for_files($order->id)=='upload') { 
  4.  
  5. $actions['upload'] = array( 
  6. 'url' => $order->get_view_order_url(),  
  7. 'name' => __( 'Upload files', 'woocommerce-umf' ) 
  8. ); 
  9.  
  10. return $actions; 
  11.