Changeset 2557776
- Timestamp:
- 07/02/2021 02:17:41 PM (5 years ago)
- Location:
- impact-partnership-cloud
- Files:
-
- 2 edited
- 6 copied
-
tags/1.0.9 (copied) (copied from impact-partnership-cloud/trunk)
-
tags/1.0.9/impact.php (copied) (copied from impact-partnership-cloud/trunk/impact.php) (4 diffs)
-
tags/1.0.9/includes/impact_settings_page.php (copied) (copied from impact-partnership-cloud/trunk/includes/impact_settings_page.php)
-
tags/1.0.9/includes/no_woocommerce_access.php (copied) (copied from impact-partnership-cloud/trunk/includes/no_woocommerce_access.php)
-
tags/1.0.9/js/impact.js (copied) (copied from impact-partnership-cloud/trunk/js/impact.js)
-
tags/1.0.9/readme.txt (copied) (copied from impact-partnership-cloud/trunk/readme.txt) (1 diff)
-
trunk/impact.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
impact-partnership-cloud/tags/1.0.9/impact.php
r2555982 r2557776 3 3 * Plugin Name: Impact: Partnership Cloud 4 4 * Description: Partnership cloud app plugin for Woocomerce that tracks every conversion made trough one of Impact's referral links. 5 * Version: 1.0. 85 * Version: 1.0.9 6 6 * Requires at least: 5.0 7 7 * Requires PHP: 7.0 … … 23 23 { 24 24 25 private $version = "1.0. 8";25 private $version = "1.0.9"; 26 26 static $instance = false; 27 27 … … 128 128 ); 129 129 } 130 add_option("impact_request_value", $consumer_key); 130 if ($response['response']['code'] == 201) { 131 add_option("impact_request_value", $consumer_key); 132 } 131 133 } 132 134 … … 447 449 * auth credentials 448 450 */ 449 public function impact_activate() 450 { 451 global $user; 452 global $wpdb; 453 454 $store_url = home_url(); 455 $user = wp_get_current_user(); 456 457 $endpoint = '/wc-auth/v1/authorize'; 458 $params = [ 459 'app_name' => 'Impact', 460 'scope' => 'read_write', 461 'user_id' => $user->user_login, 462 'return_url' => home_url().'/wp-admin/admin.php?page=impact-settings', 463 'callback_url' => home_url().'/wp-json/impact/v1/callback' 464 ]; 465 $query_string = http_build_query( $params ); 466 $url = $store_url . $endpoint . '?' . $query_string; 467 wp_redirect($url); 468 exit; 451 public function impact_activate($plugin) 452 { 453 $arr = explode("/", $plugin); 454 if (count($arr) >= 1 && strpos($arr[count($arr) - 1], "impact") !== false) { 455 global $user; 456 global $wpdb; 457 458 $store_url = home_url(); 459 $user = wp_get_current_user(); 460 461 $endpoint = '/wc-auth/v1/authorize'; 462 $params = [ 463 'app_name' => 'Impact', 464 'scope' => 'read_write', 465 'user_id' => $user->user_login, 466 'return_url' => home_url().'/wp-admin/admin.php?page=impact-settings', 467 'callback_url' => home_url().'/wp-json/impact/v1/callback' 468 ]; 469 $query_string = http_build_query( $params ); 470 $url = $store_url . $endpoint . '?' . $query_string; 471 wp_redirect($url); 472 exit; 473 } 469 474 } 470 475 -
impact-partnership-cloud/tags/1.0.9/readme.txt
r2555982 r2557776 4 4 Tested up to: 5.7 5 5 Requires PHP: 7.0 6 Stable tag: 1.0. 86 Stable tag: 1.0.9 7 7 License: GPLv2 or later License 8 8 URI: http://www.gnu.org/licenses/gpl-2.0.html -
impact-partnership-cloud/trunk/impact.php
r2555982 r2557776 3 3 * Plugin Name: Impact: Partnership Cloud 4 4 * Description: Partnership cloud app plugin for Woocomerce that tracks every conversion made trough one of Impact's referral links. 5 * Version: 1.0. 85 * Version: 1.0.9 6 6 * Requires at least: 5.0 7 7 * Requires PHP: 7.0 … … 23 23 { 24 24 25 private $version = "1.0. 8";25 private $version = "1.0.9"; 26 26 static $instance = false; 27 27 … … 128 128 ); 129 129 } 130 add_option("impact_request_value", $consumer_key); 130 if ($response['response']['code'] == 201) { 131 add_option("impact_request_value", $consumer_key); 132 } 131 133 } 132 134 … … 447 449 * auth credentials 448 450 */ 449 public function impact_activate() 450 { 451 global $user; 452 global $wpdb; 453 454 $store_url = home_url(); 455 $user = wp_get_current_user(); 456 457 $endpoint = '/wc-auth/v1/authorize'; 458 $params = [ 459 'app_name' => 'Impact', 460 'scope' => 'read_write', 461 'user_id' => $user->user_login, 462 'return_url' => home_url().'/wp-admin/admin.php?page=impact-settings', 463 'callback_url' => home_url().'/wp-json/impact/v1/callback' 464 ]; 465 $query_string = http_build_query( $params ); 466 $url = $store_url . $endpoint . '?' . $query_string; 467 wp_redirect($url); 468 exit; 451 public function impact_activate($plugin) 452 { 453 $arr = explode("/", $plugin); 454 if (count($arr) >= 1 && strpos($arr[count($arr) - 1], "impact") !== false) { 455 global $user; 456 global $wpdb; 457 458 $store_url = home_url(); 459 $user = wp_get_current_user(); 460 461 $endpoint = '/wc-auth/v1/authorize'; 462 $params = [ 463 'app_name' => 'Impact', 464 'scope' => 'read_write', 465 'user_id' => $user->user_login, 466 'return_url' => home_url().'/wp-admin/admin.php?page=impact-settings', 467 'callback_url' => home_url().'/wp-json/impact/v1/callback' 468 ]; 469 $query_string = http_build_query( $params ); 470 $url = $store_url . $endpoint . '?' . $query_string; 471 wp_redirect($url); 472 exit; 473 } 469 474 } 470 475 -
impact-partnership-cloud/trunk/readme.txt
r2555982 r2557776 4 4 Tested up to: 5.7 5 5 Requires PHP: 7.0 6 Stable tag: 1.0. 86 Stable tag: 1.0.9 7 7 License: GPLv2 or later License 8 8 URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.