Changeset 2587340
- Timestamp:
- 08/23/2021 08:04:12 PM (5 years ago)
- Location:
- order-postback-woo/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (3 diffs)
-
includes/class-order-postback-woo.php (modified) (1 diff)
-
order-postback-woo.php (modified) (3 diffs)
-
public/class-order-postback-woo-public.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
order-postback-woo/trunk/README.txt
r2480338 r2587340 4 4 Tags: affiliate pixel tracking, pixel tracking, woocommerce, order postback, affiliates 5 5 Requires at least: 3.1 6 Tested up to: 5. 6.27 Stable tag: 1.0. 76 Tested up to: 5.8 7 Stable tag: 1.0.8 8 8 Requires PHP: 5.6 or above 9 9 License: GPLv2 or later … … 36 36 Taboola 37 37 zapier webhooks 38 CAKE 39 MyLead 40 LemonAds 41 Affiliaxe 38 42 image url callback 39 CAKE40 43 Any affiliate network that supports image or server 2 server postback calls 41 44 … … 81 84 82 85 == Changelog == 86 = 1.0.8 = 87 Tested upto WooCommerce 5.6.0 and WP 5.8 88 fixed special characters for $curren as a key 89 83 90 = 1.0.7 = 84 91 fixed issue with incoming click id -
order-postback-woo/trunk/includes/class-order-postback-woo.php
r2480333 r2587340 71 71 $this->version = ORDER_POSTBACK_WOO_VERSION; 72 72 } else { 73 $this->version = '1.0. 7';73 $this->version = '1.0.8'; 74 74 } 75 75 $this->plugin_name = $this->order_postback_woo = 'order-postback-woo'; -
order-postback-woo/trunk/order-postback-woo.php
r2480333 r2587340 17 17 * Plugin URI: https://www.wpconcierges.com/plugins/order_postback_woo/ 18 18 * 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. 719 * Version: 1.0.8 20 20 * Author: WpConcierges 21 21 * Author URI: https://www.wpconcierges.com/ … … 25 25 * Domain Path: /languages 26 26 * WC requires at least: 3.0 27 * WC tested up to: 5. 0.027 * WC tested up to: 5.6.0 28 28 */ 29 29 … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'ORDER_POSTBACK_WOO_VERSION', '1.0. 7' );40 define( 'ORDER_POSTBACK_WOO_VERSION', '1.0.8' ); 41 41 42 42 /** -
order-postback-woo/trunk/public/class-order-postback-woo-public.php
r2480333 r2587340 256 256 257 257 foreach($metas as $meta_key => $meta_value){ 258 258 259 if(in_array($meta_value,$keys)){ 259 260 $params[$meta_key]=$this->order_values[$meta_value]; … … 291 292 292 293 foreach($links as $link){ 293 294 $click_id = $this->get_postback_link($link,'opw_incoming_click_id');294 $click_id = get_post_meta($link['ID'],'opw_incoming_click_id',true); 295 295 296 296 297 if(isset($_GET[$click_id])){ … … 329 330 $fields = array(); 330 331 331 if(strlen($field_to_get)>0){ 332 $fields =$this->get_postback_link_field($link,$field_to_get); 333 }else{ 334 $fields =$this->get_postback_link_fields($link); 335 } 332 $fields =$this->get_postback_link_fields($link); 333 336 334 return $fields; 337 335 } 338 336 339 private function get_postback_link_field($link,$field_to_get){ 340 $post_id = $link['ID']; 341 $field = get_post_meta($link['ID'],$field_to_get,true); 342 343 return $field; 344 } 337 345 338 346 339 … … 394 387 395 388 } 389 390 private function build_query_string($params){ 391 $query=""; 392 $count=0; 393 $specail_chars = array("currency"); 394 395 foreach($params as $key => $value){ 396 if($count==0){ 397 $query=$key."=".$value; 398 }else{ 399 $and ="&"; 400 if(in_array($key,$specail_chars)){ 401 $and="&"; 402 } 403 $query.=$and.$key."=".$value; 404 } 405 $count++; 406 } 407 return $query; 408 } 409 396 410 397 411 private function do_postback_woo() 398 { 412 { 413 setlocale(LC_ALL, 'us_En'); 399 414 $links = $this->get_all_links(); 400 415 $response = array(); … … 405 420 $opw = $this->get_postback_link($link); 406 421 407 $this->can_fire_check($opw);422 $this->can_fire_check($opw); 408 423 409 if($this->can_fire){424 if($this->can_fire){ 410 425 $this->postback_url = $opw['opw_url']; 426 411 427 $this->postback_params = $this->get_postback_params($opw); 412 428 413 429 430 414 431 $args = array(); 415 432 416 433 if($opw['opw_method'] == "get"){ 417 434 if(strpos($this->postback_url,"?")>0){ 418 $this->postback_url = $this->postback_url."& ".http_build_query($this->postback_params);435 $this->postback_url = $this->postback_url."&".$this->build_query_string($this->postback_params); 419 436 }else{ 420 $this->postback_url = $this->postback_url."?". http_build_query($this->postback_params);437 $this->postback_url = $this->postback_url."?".$this->build_query_string($this->postback_params); 421 438 } 422 439 … … 428 445 429 446 } 430 }447 } 431 448 432 }449 } 433 450 434 451 return $response;
Note: See TracChangeset
for help on using the changeset viewer.