Plugin Directory

Changeset 1984334


Ignore:
Timestamp:
12/03/2018 10:07:11 AM (7 years ago)
Author:
raiserweb
Message:

update plugin support

Location:
order-emails-log-for-woocommerce/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • order-emails-log-for-woocommerce/trunk/email-log.php

    r1821515 r1984334  
    2626        // saves order id
    2727        add_action( 'woocommerce_email_order_details', array( &$this, 'email_details' ), 10, 4 );
    28        
     28       
     29        // saves order_id for plugin woocommerce-email-center
     30        add_filter( 'rp_wcec_send_email_immediately', array( &$this, 'for_email_plugin'), 10, 3 );
     31        add_filter( 'rp_wcec_schedule_email', array( &$this, 'for_email_plugin'), 10, 3 ); 
     32
     33        // saved order id for plugin automatewoo
     34        add_filter( 'automatewoo/workflow/mailer', array( &$this, 'for_automatewoo_plugin'), 30, 2 );
     35       
    2936        // fires on wp_mail
    3037        add_filter( 'wp_mail', array( &$this, 'log_email' ), PHP_INT_MAX );
    3138               
    3239    }
     40   
     41    // saved order id
     42    public function for_automatewoo_plugin( $mailer, $workflow ){
     43        if( isset($workflow->workflow->log->meta_cache['order_id']) ){
     44            $this->order_id = $workflow->workflow->log->meta_cache['order_id'];
     45        }
     46        return $mailer;
     47    }   
     48   
     49    // saved order id
     50    public function for_email_plugin( $boo, $t, $args ){
     51        if( isset($args['order'] )){
     52            $this->order_id = trim(str_replace('#', '', $args['order']->get_order_number())); 
     53        }
     54        return true;
     55    }       
    3356   
    3457    // saved order id
  • order-emails-log-for-woocommerce/trunk/readme.txt

    r1604570 r1984334  
    44Tags: woocommerce, email log, woocommerce email log
    55Requires at least: 3.0.1
    6 Tested up to: 4.7
     6Tested up to: 4.9
    77Stable tag: 1.1
    88License: GPLv2 or later
     
    1919Who the email was sent to
    2020The email subject line
     21
     22Supports Automatewoo and Woocommerce Email Center
    2123
    2224We also have a premium plugin which offers the following additional features:
Note: See TracChangeset for help on using the changeset viewer.