umf_mail

Attach email link to emails, this removes the email templates inside /woocommerce-upload-my-file/templates/.

Description

umf_mail( $order ); 

Parameters (1)

0. $order
The order.

Usage

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

Defined (1)

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

/inc/umf-funct.php  
  1. function umf_mail($order) { 
  2. $count=get_max_upload_count($order); 
  3. if($count>0) { 
  4. if(check_for_files($order->id)=='upload') { 
  5. echo '<h2>'._n('Upload file', 'Upload files', $count, 'woocommerce-umf' ).'</h2>'; 
  6.  
  7. if ( version_compare( WOOCOMMERCE_VERSION, "2.1" ) <= 0 ) { 
  8. echo '<p><a href="'. esc_url( add_query_arg('order', $order->id, get_permalink(woocommerce_get_page_id('view_order'))) ).'" ><span>'._n( 'Login to upload your file and attach it to your order.', 'Login to upload your files and attach them to your order.', $count, 'woocommerce-umf' ).'</span></a>'; 
  9. } else { 
  10. echo '<p><a href="'. esc_url( $order->get_view_order_url() ).'" ><span>'._n( 'Login to upload your file and attach it to your order.', 'Login to upload your files and attach them to your order.', $count, 'woocommerce-umf' ).'</span></a>';