Plugin Directory

Changeset 2687812


Ignore:
Timestamp:
03/02/2022 09:12:18 PM (4 years ago)
Author:
wpconcierges
Message:

added check to not fire on reload, allowing for 5 links in the free version, checked woo 6.2.1 compatiblity, wordpress 5.9.x

Location:
order-postback-woo/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • order-postback-woo/trunk/README.txt

    r2587358 r2687812  
    44Tags: affiliate pixel tracking, pixel tracking, woocommerce, order postback, affiliates
    55Requires at least: 3.1
    6 Tested up to: 5.8
    7 Stable tag: 1.0.9
     6Tested up to: 5.9.1
     7Stable tag: 1.1.0
    88Requires PHP: 5.6 or above
    99License: GPLv2 or later
     
    4444
    4545
    46 If you need to post/get more than 1 url check out the Pro version.   
     46If you need to post/get more than more than 5 url, check out the Pro version.   
    4747
    4848Features of the Pro Version:
     
    8484
    8585== Changelog ==
     86= 1.1.0 =
     87tested woo 6.2.1, wordpress 5.9.1
     88Added check to not fire if already fired
     89Allowing 5 links on the free version
     90
    8691= 1.0.9 =
    8792fixed issue adding more than 10 key value pairs to the postback
  • order-postback-woo/trunk/admin/partials/order-postback-woo-admin-posts.php

    r2587358 r2687812  
    3838        $args   = [
    3939            'label'   => 'Postback Links',
    40             'default' => 1,
     40            'default' => 5,
    4141            'option'  => 'links_per_page'
    4242        ];
  • order-postback-woo/trunk/includes/class-order-postback-woo-links.php

    r2442010 r2687812  
    2323        global $wpdb;
    2424
    25         $sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}posts WHERE post_type=%s LIMIT 1",array($this->post_type_slug));
     25        $sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}posts WHERE post_type=%s LIMIT 5",array($this->post_type_slug));
    2626   
    2727        $results = $wpdb->get_results( $sql, 'ARRAY_A' );
  • order-postback-woo/trunk/includes/class-order-postback-woo.php

    r2587340 r2687812  
    7171            $this->version = ORDER_POSTBACK_WOO_VERSION;
    7272        } else {
    73             $this->version = '1.0.8';
     73            $this->version = '1.1.0';
    7474        }
    7575        $this->plugin_name = $this->order_postback_woo = 'order-postback-woo';
  • order-postback-woo/trunk/order-postback-woo.php

    r2587358 r2687812  
    1717 * Plugin URI:        https://www.wpconcierges.com/plugins/order_postback_woo/
    1818 * Description:       This plugin sends your order information from your Woocomerce store as a key/value pair to any url of your choice, using either a POST or GET.  This is useful if you would like to store your orders or process orders outside of your Woocommerce store.
    19  * Version:           1.0.9
     19 * Version:           1.1.0
    2020 * Author:            WpConcierges
    2121 * Author URI:        https://www.wpconcierges.com/
     
    2525 * Domain Path:       /languages
    2626 * WC requires at least: 3.0
    27  * WC tested up to: 5.6.0
     27 * WC tested up to: 6.2.1
    2828 */
    2929
     
    3838 * Rename this for your plugin and update it as you release new versions.
    3939 */
    40 define( 'ORDER_POSTBACK_WOO_VERSION', '1.0.9' );
     40define( 'ORDER_POSTBACK_WOO_VERSION', '1.1.0' );
    4141
    4242/**
  • order-postback-woo/trunk/public/class-order-postback-woo-public.php

    r2587340 r2687812  
    290290       
    291291        $links = $this->get_all_links();
    292    
     292        $host = parse_url(get_option('siteurl'), PHP_URL_HOST);
     293   
    293294        foreach($links as $link){
    294295                 $click_id = get_post_meta($link['ID'],'opw_incoming_click_id',true);
     
    300301                    if(strlen($click_id) && strlen($get_click_id)){
    301302                         $expiry = strtotime('+1 month');
    302                          setcookie($click_id,$get_click_id,$expiry,COOKIEPATH,COOKIE_DOMAIN);
     303                         setcookie($click_id,$get_click_id,$expiry,"/",$host);
    303304                  }
    304305             }
     
    309310
    310311   private function can_fire_check($params){
     312
     313    if(isset($_COOKIE['wpc_opwf'])){
     314        $this->can_fire = false;
     315        return; 
     316     }
     317
    311318      if($params['opw_fire']=="no"){
    312319          $this->can_fire = true;
     
    335342    }
    336343   
    337 
    338    
    339      
    340344   
    341345    private function get_postback_link_fields($link){
     
    426430           
    427431           $this->postback_params = $this->get_postback_params($opw);
    428          
    429          
     432              $host = parse_url(get_option('siteurl'), PHP_URL_HOST);
     433     
     434            setcookie("wpc_opwf",1,0,"/",$host);
     435             
    430436           
    431437            $args = array();
Note: See TracChangeset for help on using the changeset viewer.