Changeset 3217981
- Timestamp:
- 01/06/2025 08:52:01 PM (15 months ago)
- Location:
- wecantrack
- Files:
-
- 27 added
- 5 edited
-
tags/1.5.0 (added)
-
tags/1.5.0/README.md (added)
-
tags/1.5.0/WecantrackAdmin.php (added)
-
tags/1.5.0/WecantrackApp.php (added)
-
tags/1.5.0/WecantrackAppRedirectPage.php (added)
-
tags/1.5.0/WecantrackHelper.php (added)
-
tags/1.5.0/css (added)
-
tags/1.5.0/css/admin.css (added)
-
tags/1.5.0/images (added)
-
tags/1.5.0/images/favicon.png (added)
-
tags/1.5.0/images/favicon2.png (added)
-
tags/1.5.0/images/wct-logo-normal.svg (added)
-
tags/1.5.0/index.php (added)
-
tags/1.5.0/js (added)
-
tags/1.5.0/js/.gitignore (added)
-
tags/1.5.0/js/admin.js (added)
-
tags/1.5.0/js/advanced_settings.js (added)
-
tags/1.5.0/js/redirect_page.js (added)
-
tags/1.5.0/license.txt (added)
-
tags/1.5.0/locale (added)
-
tags/1.5.0/readme.txt (added)
-
tags/1.5.0/views (added)
-
tags/1.5.0/views/advanced_settings.php (added)
-
tags/1.5.0/views/redirect_page.php (added)
-
tags/1.5.0/views/settings.php (added)
-
tags/1.5.0/wecantrack.php (added)
-
tags/1.5.0/wecantrack.pot (added)
-
trunk/WecantrackApp.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/views/advanced_settings.php (modified) (3 diffs)
-
trunk/wecantrack.php (modified) (4 diffs)
-
trunk/wecantrack.pot (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wecantrack/trunk/WecantrackApp.php
r3056236 r3217981 80 80 81 81 /** 82 * Responsible for checking if the website can redirect through &afflink parameter. (afflink is default) 83 * Shouldn't be used if auto tagging is enabled. 82 * Responsible for checking if the website can redirect through &afflink parameter. 84 83 * 85 84 * @return bool 86 85 */ 87 86 private function can_redirect_through_parameter() : bool { 88 if (! isset($this->options_storage['can_redirect_through_parameter']) || $this->options_storage['can_redirect_through_parameter'] === 1) { 89 return true; 90 } 91 92 // if type=session is not found in the snippet, then we have to redirect through parameter 87 // if not using auto-tagging and there is no explicit setting for we can redirect through parameter then we can redirect 93 88 // else we might break the redirects 94 89 if ($this->snippet && strpos($this->snippet, 'type=session') === false) { 95 90 return true; 91 } 92 93 // default setting is false 94 if (isset($this->options_storage['can_redirect_through_parameter'])) { 95 if ($this->options_storage['can_redirect_through_parameter'] == 1) { 96 return true; 97 } 96 98 } 97 99 … … 205 207 add_filter('wp_redirect', array($this, 'redirect_default'), 99); 206 208 207 if (!isset($this->options_storage['include_script']) || $this->options_storage['include_script'] == =true) {209 if (!isset($this->options_storage['include_script']) || $this->options_storage['include_script'] == true) { 208 210 add_action('wp_head', array($this, 'insert_snippet')); 209 211 } -
wecantrack/trunk/readme.txt
r3094460 r3217981 3 3 Tags: affiliate, publisher, analytics, conversion tracking, sale attribution, dashboard, subid, google analytics, link, google ads, facebook, data studio, we can track, wecantrack, tracking tool 4 4 Requires at least: 4.6 5 Tested up to: 6. 46 Requires PHP: 7. 37 Stable tag: 1. 4.95 Tested up to: 6.7.1 6 Requires PHP: 7.4 7 Stable tag: 1.5.0 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 58 58 == Changelog == 59 59 60 = 1.5.0 - 6th January 2025 = 61 * Support WP 6.7.1 62 * Sync wct script when upgrading plugin 63 * Set afflink parameter off by default 64 60 65 = 1.4.9 - 29th May 2024 = 61 * Do not run WCT on a cron job66 * Do not run WCT on a cron job 62 67 63 68 = 1.4.8 - 20th March 2024 = 64 * Redirect Through Parameter fix69 * Redirect Through Parameter fix 65 70 66 71 = 1.4.7 - 28th December 2023 = 67 * New setting added to disable redirect through parameter72 * New setting added to disable redirect through parameter 68 73 69 74 = 1.4.6 - 16th October 2023 = 70 * Detect Elementor's & Divi's page builder mode75 * Detect Elementor's & Divi's page builder mode 71 76 72 77 = 1.4.5 - 17th August 2023 = 73 * Do not log relative URLs as faulty74 * Wordpress 6.3 support78 * Do not log relative URLs as faulty 79 * Wordpress 6.3 support 75 80 76 81 = 1.4.4 - 10th January 2023 = 77 * Fixed visual bug for disable wct.js script option82 * Fixed visual bug for disable wct.js script option 78 83 79 84 = 1.4.3 - 21st December 2022 = 80 * New option to disable wct.js script85 * New option to disable wct.js script 81 86 82 87 = 1.4.2 - 10th October 2022 = 83 * Made thrive page builder detection pattern more greedy88 * Made thrive page builder detection pattern more greedy 84 89 85 90 = 1.4.1 - 31st August 2022 = 86 * Improved affiliate url pattern matching91 * Improved affiliate url pattern matching 87 92 88 93 = 1.4.0 - 16th March 2022 = -
wecantrack/trunk/views/advanced_settings.php
r3040267 r3217981 3 3 $wecantrack_nonce = wp_create_nonce('wecantrack_nonce'); 4 4 $wecantrack_storage = json_decode(get_option('wecantrack_storage'), true); 5 $wecantrack_script = get_option('wecantrack_snippet'); 6 // $wecantrack_script = preg_replace('/\s+/', '', $wecantrack_script); 7 8 $wecantrack_auto_tagging = false; 9 if (strpos($wecantrack_script, "'auto_tagging' : true") !== false) { 10 $wecantrack_auto_tagging = true; 11 } 5 12 6 13 //plugins status … … 16 23 $wecantrack_ssl_status_disabled = !empty($wecantrack_storage['disable_ssl']) ? 'checked="checked"' : null; 17 24 18 if ( ! isset($wecantrack_storage['can_redirect_through_parameter']) ||$wecantrack_storage['can_redirect_through_parameter'] == true) {25 if (isset($wecantrack_storage['can_redirect_through_parameter']) && $wecantrack_storage['can_redirect_through_parameter'] == true) { 19 26 $wecantrack_can_redirect_through_parameter_enabled = 'checked="checked"'; 20 27 $wecantrack_can_redirect_through_parameter_disabled = null; … … 145 152 </fieldset> 146 153 147 <p class="description">With auto-tagging enabled, the need to redirect through the 'afflink' parameter may become unnecessary, allowing you to disable this feature from your website.</p>154 <p class="description">With auto-tagging enabled, the need to redirect through the 'afflink' parameter becomes irrelevant, this setting is now disabled by standard. We recommend to keep using auto-tagging since the afflink parameter can potentially be exploited by external parties to execute unauthorised redirects if they properly replicate the link and data parameter conditions.</p> 148 155 </td> 149 156 </tr> 157 158 <!-- <tr class="wecantrack-plugin-enforce-turning-off-afflink-parameter"> 159 <th scope="row"> 160 <label for=""><?php echo esc_html__('Enforce turning off Redirect Through Parameter even when `Include WCT Script` is disabled', 'wecantrack'); ?></label> 161 </th> 162 163 <td> 164 <fieldset> 165 <p> 166 <label> 167 <input name="wecantrack_enforce_turning_off_afflink_parameter" type="radio" value="1"> 168 <?php echo esc_html__('Enable', 'wecantrack'); ?> 169 </label> 170 171 <label> 172 <input name="wecantrack_enforce_turning_off_afflink_parameter" type="radio" value="0"> 173 <?php echo esc_html__('Disable', 'wecantrack'); ?> 174 </label> 175 </p> 176 </fieldset> 177 178 <p class="description">please ensure that your manually placed JS tag has auto-tagging enabled, else this setting can break your outgoing URLs.</p> 179 </td> 180 </tr> --> 150 181 151 182 </tbody> -
wecantrack/trunk/wecantrack.php
r3094454 r3217981 7 7 Plugin URI: https://wecantrack.com/wordpress 8 8 Description: Integrate all you affiliate sales in Google Analytics, Google Ads, Facebook, Data Studio and more! 9 Version: 1. 4.99 Version: 1.5.0 10 10 Author: wecantrack.com 11 11 Author URI: https://wecantrack.com 12 Requires PHP: 7. 312 Requires PHP: 7.4 13 13 License: GPLv3 14 14 Text Domain: wecantrack … … 17 17 if(!defined('ABSPATH')) { die('You are not allowed to call this page directly.'); } 18 18 19 define('WECANTRACK_VERSION', '1. 4.9');19 define('WECANTRACK_VERSION', '1.5.0'); 20 20 define('WECANTRACK_PLUGIN_NAME', 'wecantrack'); 21 21 define('WECANTRACK_PATH', WP_PLUGIN_DIR.'/'.WECANTRACK_PLUGIN_NAME); … … 48 48 register_deactivation_hook(__FILE__, 'wecantrack_plugin_deactivation'); 49 49 register_uninstall_hook(__FILE__, 'wecantrack_plugin_uninstall'); 50 add_action('upgrader_process_complete', 'wecantrack_plugin_upgraded', 10, 2); 50 51 51 52 function wecantrack_plugin_activation() … … 85 86 delete_option('wecantrack_storage'); 86 87 } 88 89 function wecantrack_plugin_upgraded($upgrader_object, $options) { 90 $current_plugin_path_name = plugin_basename( __FILE__ ); 91 92 if ($options['action'] == 'upgrade' && $options['type'] == 'plugin') { 93 foreach($options['plugins'] as $each_plugin) { 94 if ($each_plugin == $current_plugin_path_name) { 95 $api_key = get_option('wecantrack_api_key'); 96 97 if (empty($api_key)) { 98 return; 99 } 100 101 // refetch the wecantrack script 102 $domainURL = home_url(); 103 try { 104 WecantrackHelper::update_tracking_code($api_key, $domainURL); 105 WecantrackHelper::update_user_website_information($api_key, $domainURL); 106 } catch (\Exception $e) { 107 error_log('WCT Plugin: Error occurred during plugin upgrade. Message: ' . $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()); 108 } 109 110 // set can_redirect_through_parameter to true if include_script is false and can_redirect_through_parameter is not set 111 $wecantrack_storage = json_decode(get_option('wecantrack_storage'), true); 112 113 if (!isset($wecantrack_storage['can_redirect_through_parameter']) || $wecantrack_storage['can_redirect_through_parameter'] === null) { 114 if (isset($wecantrack_storage['include_script']) && $wecantrack_storage['include_script'] == false) { 115 $wecantrack_storage['can_redirect_through_parameter'] = true; 116 update_option('wecantrack_storage', json_encode($wecantrack_storage)); 117 } 118 } 119 } 120 } 121 } 122 } -
wecantrack/trunk/wecantrack.pot
r3094454 r3217981 1 # Copyright (C) 202 4wecantrack.com1 # Copyright (C) 2025 wecantrack.com 2 2 # This file is distributed under the same license as the WeCanTrack plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WeCanTrack 1. 4.9\n"5 "Project-Id-Version: WeCanTrack 1.5.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wecantrack\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-05-29T09:53:19+00:00\n"12 "POT-Creation-Date: 2025-01-06T20:39:49+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" … … 35 35 msgstr "" 36 36 37 #: views/advanced_settings.php: 5737 #: views/advanced_settings.php:64 38 38 msgid "Include WCT Script" 39 39 msgstr "" 40 40 41 #: views/advanced_settings.php:65 42 #: views/advanced_settings.php:89 43 #: views/advanced_settings.php:113 44 #: views/advanced_settings.php:137 41 #: views/advanced_settings.php:72 42 #: views/advanced_settings.php:96 43 #: views/advanced_settings.php:120 44 #: views/advanced_settings.php:144 45 #: views/advanced_settings.php:168 45 46 #: views/redirect_page.php:51 46 47 #: views/settings.php:79 … … 48 49 msgstr "" 49 50 50 #: views/advanced_settings.php:70 51 #: views/advanced_settings.php:94 52 #: views/advanced_settings.php:118 53 #: views/advanced_settings.php:142 51 #: views/advanced_settings.php:77 52 #: views/advanced_settings.php:101 53 #: views/advanced_settings.php:125 54 #: views/advanced_settings.php:149 55 #: views/advanced_settings.php:173 54 56 #: views/redirect_page.php:56 55 57 #: views/settings.php:84 … … 57 59 msgstr "" 58 60 59 #: views/advanced_settings.php:8 161 #: views/advanced_settings.php:88 60 62 msgid "Use WCT referrer cookie" 61 63 msgstr "" 62 64 63 #: views/advanced_settings.php:1 0565 #: views/advanced_settings.php:112 64 66 msgid "Verify SSL" 65 67 msgstr "" 66 68 67 #: views/advanced_settings.php:1 2969 #: views/advanced_settings.php:136 68 70 msgid "Redirect Through Parameter (afflink)" 69 71 msgstr "" 70 72 71 #: views/advanced_settings.php:155 73 #: views/advanced_settings.php:160 74 msgid "Enforce turning off Redirect Through Parameter even when `Include WCT Script` is disabled" 75 msgstr "" 76 77 #: views/advanced_settings.php:186 72 78 #: views/redirect_page.php:104 73 79 #: views/settings.php:109
Note: See TracChangeset
for help on using the changeset viewer.