Plugin Directory

Changeset 2965335


Ignore:
Timestamp:
09/11/2023 12:43:16 PM (3 years ago)
Author:
mailcamp
Message:

Final version

Location:
mailcamp/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • mailcamp/trunk/README.txt

    r2965311 r2965335  
    55Requires at least: 4.9.1
    66Tested up to: 6.3.1
    7 Stable tag: 1.5.11
     7Stable tag: 1.5.12
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    2222This section describes how to install the plugin and get started using it.
    2323
    24 = Version 1.5.11 =
     24= Version 1.5.12 =
    25251. Unzip our archive and upload the entire mailcamp directory to your `/wp-content/plugins/ directory`
    26262. Activate the plugin through the **Plugins** menu in WordPress
     
    3131
    3232== Changelog ==
     33
     34== 1.5.12 ==
     35* bugfix - fixed PHP 8 notices and warnings
    3336
    3437== 1.5.11 ==
  • mailcamp/trunk/admin/class-mailcamp-admin.php

    r2965311 r2965335  
    221221            if(!empty($lists->item)){
    222222                foreach ( $lists->item as $key => $list ) {
    223                     $option_lists[] = [
    224                         'listid'           => intval( $list->listid ),
    225                         'listname'         => htmlentities( $list->name ),
    226                         'shortcode'        => 'mailcamp_list_' . intval( $list->listid ),
    227                         'subscribecount'   => current( $list->subscribecount ),
    228                         'unsubscribecount' => current( $list->unsubscribecount ),
    229                         'bouncecount'      => current( $list->bouncecount ),
    230                         'spf'              => current( $list->spf ),
    231                         'dkim'             => current( $list->dkim ),
     223                    $option_lists[] = [
     224                        'listid'           => intval( $list->listid ),
     225                        'listname'         => htmlentities( $list->name ),
     226                        'shortcode'        => 'mailcamp_list_' . intval( $list->listid ),
     227                        'subscribecount'   => (int)$list->subscribecount,
     228                        'unsubscribecount' => (int)$list->unsubscribecount,
     229                        'bouncecount'      => (int)$list->bouncecount,
     230                        'spf'              => (int)$list->spf,
     231                        'dkim'             => (int)$list->dkim,
    232232                    ];
    233233                }
     
    600600                        'listname'         => htmlentities( $list->name ),
    601601                        'shortcode'        => 'mailcamp_list_' . intval( $list->listid ),
    602                         'subscribecount'   => current( $list->subscribecount ),
    603                         'unsubscribecount' => current( $list->unsubscribecount ),
    604                         'bouncecount'      => current( $list->bouncecount ),
    605                         'spf'              => current( $list->spf ),
    606                         'dkim'             => current( $list->dkim ),
     602                        'subscribecount'   => (int)$list->subscribecount,
     603                        'unsubscribecount' => (int)$list->unsubscribecount,
     604                        'bouncecount'      => (int)$list->bouncecount,
     605                        'spf'              => (int)$list->spf,
     606                        'dkim'             => (int)$list->dkim,
    607607                    ];
    608608                }
  • mailcamp/trunk/admin/settings-callbacks.php

    r2965311 r2965335  
    528528/** @since 1.5.3 */
    529529
    530 function mailcamp_callback_fields_dropdown($fields = [], $field, $mappings) {
     530function mailcamp_callback_fields_dropdown($fields = [], $field = '', $mappings = []) {
    531531
    532532        $output = '<select name="mailcamp_options_wc[wc_mapped_fields][' . $field . ']"><option value="">' . __('Select a field', 'mailcamp') . '</option>';
  • mailcamp/trunk/includes/core-functions.php

    r2965311 r2965335  
    4444    // get the position of the email field (this field is not added yet)
    4545    $email_key_arr = @array_keys( $mailcamp_list_fields, 'email' );
    46 
     46   
    4747    // Create the email field (this field could not be fetched, so we have to create it)
    4848    $email_field            = new stdClass();
  • mailcamp/trunk/mailcamp.php

    r2965311 r2965335  
    1414 * Plugin URI:        https://mailcamp.nl/ecommerce/koppel-wordpress-plugin-aan-mailinglijst-in-mailcamp/
    1515 * Description:       MailCamp form plugin. A simple plugin that adds a highly effective subscription form to your site.
    16  * Version:           1.5.11
     16 * Version:           1.5.12
    1717 * Author:            Silas de Rooy
    1818 * Author URI:        https://mailcamp.nl
     
    3333 * Rename this for your plugin and update it as you release new versions.
    3434 */
    35 define('MAILCAMP_VERSION', '1.5.11');
     35define('MAILCAMP_VERSION', '1.5.12');
    3636/**
    3737 * The code that runs during plugin activation.
  • mailcamp/trunk/public/class-mailcamp-public.php

    r2965311 r2965335  
    149149                // Check if subscriber already exists
    150150                $mc_api->getSubscriberFromList($custom_fields['email'], $custom_fields['listid']);
    151                 $msg = current($mc_api->result->data);
     151                $msg = (string)$mc_api->result->data;
    152152                $insert = false;
    153153                // we have to add this || since the MailCamp api has changed for the response on this call
    154                 if(!$msg || (isset($mc_api->result->status) && $mc_api->result->status === false)){
     154                if($msg !== '' || (isset($mc_api->result->status) && $mc_api->result->status === false)){
    155155                    // insert subscriber
    156156                    $mc_api->insertSubscriber( $custom_fields );
    157                     $msg = current( $mc_api->result->data );
     157                    $msg = (string)$mc_api->result->data;
    158158                    $insert = true;
    159159                }
     
    165165                    if ( isset( $mc_api->result->data->confirmcode ) ) {
    166166                        if(!$insert){
    167                             $confirmdate = current($mc_api->result->data->confirmdate);
    168                             $requestdate = current($mc_api->result->data->requestdate);
     167                            $confirmdate = (string)$mc_api->result->data->confirmdate;
     168                            $requestdate = (string)$mc_api->result->data->requestdate;
    169169                            if($confirmdate > 0){
    170170                                // already confirmed inform user
     
    181181                        }
    182182
    183                         $confirmcode = current( $mc_api->result->data->confirmcode );
     183                        $confirmcode = (string)$mc_api->result->data->confirmcode;
    184184                        // the email which subscribed
    185185                        $to_email = $custom_fields['email'];
     
    400400
    401401            $mc_api->getSubscriberFromList($email, $list_id);
    402             $msg = current($mc_api->result->data);
     402            $msg = (string)$mc_api->result->data;
    403403            $insert = false;
    404404
    405405            // user is not subscribed yet
    406             if(!$msg || (isset($mc_api->result->status) && $mc_api->result->status === false)){
     406            if($msg !== '' || (isset($mc_api->result->status) && $mc_api->result->status === false)){
    407407
    408408                // check for double opt-in
     
    413413                }
    414414
    415                 $msg = current( $mc_api->result->data );
     415                $msg = (string)$mc_api->result->data;
    416416                $insert = true;
    417417            } else {
  • mailcamp/trunk/readme.md

    r2965311 r2965335  
    55Requires at least: 4.9.1
    66Tested up to: 6.3.1
    7 Stable tag: 1.5.11
     7Stable tag: 1.5.12
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    2121This section describes how to install the plugin and get started using it.
    2222
    23 = Version 1.5.11 =
     23= Version 1.5.12 =
    24241. Unzip our archive and upload the entire mailcamp directory to your `/wp-content/plugins/ directory`
    25252. Activate the plugin through the **Plugins** menu in WordPress
     
    3030
    3131## Changelog ##
     32
     33### 1.5.12 ###
     34* bugfix - backup
    3235
    3336### 1.5.11 ###
Note: See TracChangeset for help on using the changeset viewer.