Plugin Directory

Changeset 775383


Ignore:
Timestamp:
09/19/2013 02:13:23 PM (13 years ago)
Author:
echoelse
Message:

Tagging version 1.0

Location:
premise-idevaffiliate-integration
Files:
1 added
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • premise-idevaffiliate-integration/tags/1.0/premise-idevaffiliate.php

    r775375 r775383  
    44Plugin URI: http://www.eugenoprea.com/wordpress-plugins/premise-idevaffiliate-integration/?utm_source=wp_admin&utm_medium=plugin&utm_campaign=premise_idevaffiliate_integration
    55Description: Integrates Premise with iDevAffiliate to help you start your affiliate program. It passes the order details and if you activate Optional Variables it will also pass the customer name, email address and the purchased product to iDevAffiliate.
    6 Version: 1.0.1
     6Version: 1.0
    77Author: Eugen Oprea
    88Author URI: http://www.eugenoprea.com/?utm_source=wp_admin&utm_medium=plugin&utm_campaign=premise_idevaffiliate_integration
     
    3434
    3535        if (isset($this->options['enabled']) && $this->options['enabled']) {
    36             add_action('premise_membership_create_order', array($this, 'get_order_data'), 10, 3);
     36            add_action('premise_membership_create_order', array($this, 'get_order_data'), 10, 4);
    3737            add_action('premise_checkout_complete_after', array($this, 'track'), 10);
    3838        }
     
    4646    }
    4747
    48     function get_order_data($member_id, $order_details, $renewal) {
     48    function get_order_data($member_id, $order_details, $renewal, $order_id) {
    4949        $this->order_data = array(
    50             'ordernum' => $order_details['_acp_order_time'],
     50            'ordernum' => get_the_title($order_id),
    5151            'salemt' => $order_details['_acp_order_price'] ? $order_details['_acp_order_price'] : 0,
    5252        );
  • premise-idevaffiliate-integration/tags/1.0/readme.txt

    r775375 r775383  
    22Premise iDevAffiliate Integration
    33Contributors: echoelse
    4 Donate link: http://www.eugenoprea.com/wordpress-plugins/premise-idevaffiliate-integration/
    54Tags: affiliate, premise, idevaffiliate, affiliate marketing, affiliates, affiliate tool, wordpress, plugin
    65Requires at least: 3.0
    76Tested up to: 3.5.1
    8 Stable tag: 1.0.1
     7Stable tag: 1.0
    98License: GPLv2 or later
    109License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4544== Changelog ==
    4645
    47 = 1.0.1 =
    48 Remove deprecated 4th argument of premise_membership_create_order action
    49 
    5046= 1.0 =
    5147
  • premise-idevaffiliate-integration/trunk/premise-idevaffiliate.php

    r701567 r775383  
    44Plugin URI: http://www.eugenoprea.com/wordpress-plugins/premise-idevaffiliate-integration/?utm_source=wp_admin&utm_medium=plugin&utm_campaign=premise_idevaffiliate_integration
    55Description: Integrates Premise with iDevAffiliate to help you start your affiliate program. It passes the order details and if you activate Optional Variables it will also pass the customer name, email address and the purchased product to iDevAffiliate.
    6 Version: 1.0.1
     6Version: 1.0.2
    77Author: Eugen Oprea
    88Author URI: http://www.eugenoprea.com/?utm_source=wp_admin&utm_medium=plugin&utm_campaign=premise_idevaffiliate_integration
     
    3434
    3535        if (isset($this->options['enabled']) && $this->options['enabled']) {
    36             add_action('premise_membership_create_order', array($this, 'get_order_data'), 10, 3);
    37             add_action('premise_checkout_complete_after', array($this, 'track'), 10);
     36            add_action('premise_membership_create_order', array($this, 'track'), 10, 3);
    3837        }
    3938
     
    4645    }
    4746
    48     function get_order_data($member_id, $order_details, $renewal) {
    49         $this->order_data = array(
    50             'ordernum' => $order_details['_acp_order_time'],
    51             'salemt' => $order_details['_acp_order_price'] ? $order_details['_acp_order_price'] : 0,
    52         );
     47    function track($member_id, $order_details, $renewal) {
     48        $product = get_post($order_details['_acp_order_product_id']);
     49        $customer = get_userdata($member_id);
    5350
    54         $this->product = get_post($order_details['_acp_order_product_id']);
    55         $this->customer = get_userdata($member_id);
    56     }
    57 
    58     function track() {
    5951        $url = trailingslashit($this->options['site_url']) . "sale.php";
    6052        $url = add_query_arg(array(
    6153            'profile' => $this->options['profile'],
    62             'idev_saleamt' => $this->order_data['salemt'],
    63             'idev_ordernum' => $this->order_data['ordernum'],
     54            'idev_saleamt' => $order_details['_acp_order_price'] ? $order_details['_acp_order_price'] : 0,
     55            'idev_ordernum' => $order_details['_acp_order_time'],
    6456            'ip_address' => $_SERVER['REMOTE_ADDR'],
    6557        ), $url);
     
    7163            switch ($this->options['variable_' . $i]) {
    7264                case 'customer_name':
    73                     $var = $this->customer->user_firstname . ' ' . $this->customer->user_lastname;
     65                    $var = $customer->user_firstname . ' ' . $this->customer->user_lastname;
    7466                    break;
    7567                case 'customer_username':
    76                     $var = $this->customer->user_login;
     68                    $var = $customer->user_login;
    7769                    break;
    7870                case 'customer_email':
    79                     $var = $this->customer->user_email;
     71                    $var = $customer->user_email;
    8072                    break;
    8173                case 'product_name':
    82                     $var = $this->product->post_title;
     74                    $var = $product->post_title;
    8375                    break;
    8476                case 'product_id':
    85                     $var = $this->product->ID;
     77                    $var = $product->ID;
    8678                    break;
    8779                case 'site_name':
  • premise-idevaffiliate-integration/trunk/readme.txt

    r701577 r775383  
    22Premise iDevAffiliate Integration
    33Contributors: echoelse
    4 Donate link: http://www.eugenoprea.com/wordpress-plugins/premise-idevaffiliate-integration/
    54Tags: affiliate, premise, idevaffiliate, affiliate marketing, affiliates, affiliate tool, wordpress, plugin
    65Requires at least: 3.0
    7 Tested up to: 3.5.1
    8 Stable tag: 1.0.1
     6Tested up to: 3.6
     7Stable tag: 1.0.2
    98License: GPLv2 or later
    109License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4544== Changelog ==
    4645
     46= 1.0.2 =
     47Track order data on create order
     48Code refactoring
     49
    4750= 1.0.1 =
    4851Remove deprecated 4th argument of premise_membership_create_order action
Note: See TracChangeset for help on using the changeset viewer.