Changeset 2555982
- Timestamp:
- 06/29/2021 04:41:10 PM (5 years ago)
- Location:
- impact-partnership-cloud
- Files:
-
- 2 edited
- 6 copied
-
tags/1.0.8 (copied) (copied from impact-partnership-cloud/trunk)
-
tags/1.0.8/impact.php (copied) (copied from impact-partnership-cloud/trunk/impact.php) (4 diffs)
-
tags/1.0.8/includes/impact_settings_page.php (copied) (copied from impact-partnership-cloud/trunk/includes/impact_settings_page.php)
-
tags/1.0.8/includes/no_woocommerce_access.php (copied) (copied from impact-partnership-cloud/trunk/includes/no_woocommerce_access.php)
-
tags/1.0.8/js/impact.js (copied) (copied from impact-partnership-cloud/trunk/js/impact.js)
-
tags/1.0.8/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.8/impact.php
r2555944 r2555982 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. 75 * Version: 1.0.8 6 6 * Requires at least: 5.0 7 7 * Requires PHP: 7.0 … … 23 23 { 24 24 25 private $version = "1.0. 7";25 private $version = "1.0.8"; 26 26 static $instance = false; 27 27 … … 66 66 'permission_callback' => '__return_true' 67 67 ) ); 68 register_rest_route("impact/v1/", "impact-settings", [ 69 "methods" => "GET", 70 "callback" => [$this, "impact_handle_get_impact_settings_callback"], 71 "permission_callback" => "__return_true" 72 ]); 68 73 } 69 74 … … 124 129 } 125 130 add_option("impact_request_value", $consumer_key); 131 } 132 133 public function impact_handle_get_impact_settings_callback($request) 134 { 135 if (!isset($request["consumer_key"])) { 136 wp_send_json("request is missing consumer_key", 422); 137 die; 138 } 139 $bearer = get_option("impact_request_value"); 140 $consumer_key = sanitize_text_field($request["consumer_key"]); 141 if ($bearer != $consumer_key) { 142 wp_send_json("consumer_key is not valid", 401); 143 die; 144 } 145 $impact_settings = get_option("impact_settings_option_name"); 146 $response = [ 147 "version" => $this->version, 148 "impact_settings" => $impact_settings 149 ]; 150 wp_send_json($response, 200); 126 151 } 127 152 -
impact-partnership-cloud/tags/1.0.8/readme.txt
r2555944 r2555982 4 4 Tested up to: 5.7 5 5 Requires PHP: 7.0 6 Stable tag: 1.0. 76 Stable tag: 1.0.8 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
r2555944 r2555982 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. 75 * Version: 1.0.8 6 6 * Requires at least: 5.0 7 7 * Requires PHP: 7.0 … … 23 23 { 24 24 25 private $version = "1.0. 7";25 private $version = "1.0.8"; 26 26 static $instance = false; 27 27 … … 66 66 'permission_callback' => '__return_true' 67 67 ) ); 68 register_rest_route("impact/v1/", "impact-settings", [ 69 "methods" => "GET", 70 "callback" => [$this, "impact_handle_get_impact_settings_callback"], 71 "permission_callback" => "__return_true" 72 ]); 68 73 } 69 74 … … 124 129 } 125 130 add_option("impact_request_value", $consumer_key); 131 } 132 133 public function impact_handle_get_impact_settings_callback($request) 134 { 135 if (!isset($request["consumer_key"])) { 136 wp_send_json("request is missing consumer_key", 422); 137 die; 138 } 139 $bearer = get_option("impact_request_value"); 140 $consumer_key = sanitize_text_field($request["consumer_key"]); 141 if ($bearer != $consumer_key) { 142 wp_send_json("consumer_key is not valid", 401); 143 die; 144 } 145 $impact_settings = get_option("impact_settings_option_name"); 146 $response = [ 147 "version" => $this->version, 148 "impact_settings" => $impact_settings 149 ]; 150 wp_send_json($response, 200); 126 151 } 127 152 -
impact-partnership-cloud/trunk/readme.txt
r2555944 r2555982 4 4 Tested up to: 5.7 5 5 Requires PHP: 7.0 6 Stable tag: 1.0. 76 Stable tag: 1.0.8 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.