Created
          February 16, 2017 11:19 
        
      - 
      
- 
        Save rynaldos-zz/35f756a22841c3101e88c981f28fad71 to your computer and use it in GitHub Desktop. 
    [WooCommerce | Print Invoice & Packing slips] Only send invoice when order is completed
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | add_filter( 'wc_pip_invoice_email_order_status_change_trigger_actions', 'woo_custom_invoice_status', 10, 2 ); | |
| function woo_custom_invoice_status( $actions, $email_class ) { | |
| $actions = array( | |
| 'woocommerce_order_status_failed_to_completed_notification', | |
| 'woocommerce_order_status_pending_to_completed_notification', | |
| 'woocommerce_order_status_processing_to_completed', | |
| ); | |
| return $actions; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment