Plugin Directory

Changeset 2622887


Ignore:
Timestamp:
11/01/2021 04:39:44 PM (4 years ago)
Author:
wecantrack
Message:

release 1.2.12

Location:
wecantrack
Files:
27 added
7 edited

Legend:

Unmodified
Added
Removed
  • wecantrack/trunk/WecantrackAdmin.php

    r2562891 r2622887  
    6565            add_option('wecantrack_referrer_cookie_status', 1);
    6666        }
     67        if(!get_option('wecantrack_storage')) {
     68            add_option('wecantrack_storage');
     69        }
    6770    }
    6871
     
    105108    public function advanced_settings_response() {
    106109        WecantrackHelper::nonce_check($_POST['wecantrack_form_nonce']);
     110        $storage = json_decode(get_option('wecantrack_storage'), true);
     111        if (!$storage) {
     112            $storage = [];
     113        }
    107114
    108115        $referrer_cookie_status = sanitize_text_field($_POST['wecantrack_referrer_cookie_status']);
     116        $ssl_status = sanitize_text_field($_POST['wecantrack_ssl_status']);
     117
     118        if ($ssl_status == 0) {
     119            $storage['disable_ssl'] = true;
     120        } else if ($ssl_status == 1) {
     121            unset($storage['disable_ssl']);
     122        }
     123        update_option('wecantrack_storage', json_encode($storage));
     124
    109125        if ($referrer_cookie_status == 0 || $referrer_cookie_status == 1) {
    110126            update_option('wecantrack_referrer_cookie_status', $referrer_cookie_status);
    111127        }
     128
    112129        echo json_encode(['msg'=>'ok']);
    113130        wp_die();
     
    254271                    'x-wp-version' => WECANTRACK_VERSION
    255272                ),
     273                'sslverify' => WecantrackHelper::get_sslverify_option()
    256274            ));
    257275
  • wecantrack/trunk/WecantrackApp.php

    r2564199 r2622887  
    307307                ),
    308308                'body' => json_encode($post_data),
     309                'sslverify' => WecantrackHelper::get_sslverify_option()
    309310            ));
    310311
     
    402403
    403404            if ($expired || !isset($domain_patterns['origins']) || $forceRefresh) {
    404                 $response = wp_remote_get(WECANTRACK_API_BASE_URL . '/api/v1/domain_patterns?api_key=' . $api_key);
     405                $response = wp_remote_get(WECANTRACK_API_BASE_URL . '/api/v1/domain_patterns?api_key=' . $api_key, array(
     406                    'sslverify' => WecantrackHelper::get_sslverify_option()
     407                ));
     408
    405409                $status = wp_remote_retrieve_response_code($response);
    406410                if ($status == 200) {
  • wecantrack/trunk/WecantrackHelper.php

    r2468989 r2622887  
    132132        return $domainURL['scheme'].'://'.$domainURL['host'];
    133133    }
     134
     135    public static function get_sslverify_option()
     136    {
     137        $storage = json_decode(get_option('wecantrack_storage'), true);
     138        return !empty($storage['disable_ssl']) ? false : true;
     139    }
    134140}
  • wecantrack/trunk/readme.txt

    r2564204 r2622887  
    55Tested up to: 5.8
    66Requires PHP: 5.6.20
    7 Stable tag: 1.2.11
     7Stable tag: 1.2.12
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    6060
    6161== Changelog ==
     62
     63= 1.2.12 - 27th October 2021 =
     64 * Overridable ssl verify option
    6265
    6366= 1.2.11 - 14th July 2021 =
  • wecantrack/trunk/views/advanced_settings.php

    r2562891 r2622887  
    22//nonce
    33$wecantrack_nonce = wp_create_nonce('wecantrack_nonce');
     4$wecantrack_storage = json_decode(get_option('wecantrack_storage'), true);
    45
    56//plugins status
     
    1112    $wecantrack_referrer_cookie_disabled = 'checked="checked"';
    1213}
     14
     15$wecantrack_ssl_status_enabled = empty($wecantrack_storage['disable_ssl']) ? 'checked="checked"' : null;
     16$wecantrack_ssl_status_disabled = !empty($wecantrack_storage['disable_ssl']) ? 'checked="checked"' : null;
    1317?>
    1418
     
    5155                </tr>
    5256
     57                <tr class="wecantrack-plugin-status">
     58                    <th scope="row">
     59                        <label for=""><?php echo esc_html__('Verify SSL', 'wecantrack'); ?></label>
     60                    </th>
     61
     62                    <td>
     63                        <fieldset>
     64                            <p>
     65                                <label>
     66                                    <input name="wecantrack_ssl_status" type="radio" value="1" <?php echo $wecantrack_ssl_status_enabled ?>>
     67                                    <?php echo esc_html__('Enable', 'wecantrack'); ?>
     68                                </label>
     69                                &nbsp;
     70                                <label>
     71                                    <input name="wecantrack_ssl_status" type="radio" value="0" <?php echo $wecantrack_ssl_status_disabled ?>>
     72                                    <?php echo esc_html__('Disable', 'wecantrack'); ?>
     73                                </label>
     74                            </p>
     75                        </fieldset>
     76
     77                        <p class="description">Verify SSL when making WCT API Request in the backend. If you have certification issues that you or your host is not able to solve you may set this to disable as a workaround.</p>
     78                    </td>
     79                </tr>
     80
    5381                </tbody>
    5482            </table>
  • wecantrack/trunk/wecantrack.php

    r2564199 r2622887  
    77Plugin URI: https://wecantrack.com/wordpress
    88Description: Integrate all you affiliate sales in Google Analytics, Google Ads, Facebook, Data Studio and more!
    9 Version: 1.2.11
     9Version: 1.2.12
    1010Author: wecantrack.com
    1111Author URI: https://wecantrack.com
     
    1717if(!defined('ABSPATH')) { die('You are not allowed to call this page directly.'); }
    1818
    19 define('WECANTRACK_VERSION', '1.2.11');
     19define('WECANTRACK_VERSION', '1.2.12');
    2020define('WECANTRACK_PLUGIN_NAME', 'wecantrack');
    2121define('WECANTRACK_PATH', WP_PLUGIN_DIR.'/'.WECANTRACK_PLUGIN_NAME);
     
    5656    add_option('wecantrack_website_options', null, null);
    5757    add_option('wecantrack_version', null, null);
     58    add_option('wecantrack_storage', null, null);
    5859}
    5960
     
    7677    delete_option('wecantrack_website_options');
    7778    delete_option('wecantrack_version');
     79    delete_option('wecantrack_storage');
    7880}
  • wecantrack/trunk/wecantrack.pot

    r2562891 r2622887  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WeCanTrack 1.2.10\n"
     5"Project-Id-Version: WeCanTrack 1.2.12\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wecantrack\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2021-07-12T13:46:31+00:00\n"
     12"POT-Creation-Date: 2021-10-26T21:35:34+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    3535msgstr ""
    3636
    37 #: views/advanced_settings.php:31
     37#: views/advanced_settings.php:35
    3838msgid "Use WCT referrer cookie"
    3939msgstr ""
    4040
    41 #: views/advanced_settings.php:39
     41#: views/advanced_settings.php:43
     42#: views/advanced_settings.php:67
    4243#: views/redirect_page.php:51
    4344#: views/settings.php:79
     
    4546msgstr ""
    4647
    47 #: views/advanced_settings.php:44
     48#: views/advanced_settings.php:48
     49#: views/advanced_settings.php:72
    4850#: views/redirect_page.php:56
    4951#: views/settings.php:84
     
    5153msgstr ""
    5254
    53 #: views/advanced_settings.php:57
     55#: views/advanced_settings.php:59
     56msgid "Verify SSL"
     57msgstr ""
     58
     59#: views/advanced_settings.php:85
    5460#: views/redirect_page.php:104
    5561#: views/settings.php:109
     
    133139msgstr ""
    134140
    135 #: WecantrackAdmin.php:211
     141#: WecantrackAdmin.php:228
    136142msgid "Something went wrong with the request"
    137143msgstr ""
    138144
    139 #: WecantrackAdmin.php:212
     145#: WecantrackAdmin.php:229
    140146msgid "Added at least 1 active network account"
    141147msgstr ""
    142148
    143 #: WecantrackAdmin.php:213
     149#: WecantrackAdmin.php:230
    144150msgid "You have not added at least 1 active network account. To add a network, click here."
    145151msgstr ""
    146152
    147 #: WecantrackAdmin.php:216
     153#: WecantrackAdmin.php:233
    148154msgid "verified"
    149155msgstr ""
    150156
    151 #: WecantrackAdmin.php:217
     157#: WecantrackAdmin.php:234
    152158msgid "Invalid API Key"
    153159msgstr ""
    154160
    155 #: WecantrackAdmin.php:218
     161#: WecantrackAdmin.php:235
    156162msgid "Invalid Request"
    157163msgstr ""
    158164
    159 #: WecantrackAdmin.php:219
     165#: WecantrackAdmin.php:236
    160166msgid "Valid API Key"
    161167msgstr ""
    162168
    163 #: WecantrackAdmin.php:220
     169#: WecantrackAdmin.php:237
    164170msgid "Your changes have been saved"
    165171msgstr ""
    166172
    167 #: WecantrackAdmin.php:221
     173#: WecantrackAdmin.php:238
    168174msgid "Something went wrong."
    169175msgstr ""
Note: See TracChangeset for help on using the changeset viewer.