Changeset 2965311
- Timestamp:
- 09/11/2023 12:22:10 PM (3 years ago)
- Location:
- mailcamp/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (3 diffs)
-
admin/class-mailcamp-admin.php (modified) (2 diffs)
-
admin/settings-callbacks.php (modified) (1 diff)
-
includes/core-functions.php (modified) (1 diff)
-
mailcamp.php (modified) (2 diffs)
-
public/class-mailcamp-public.php (modified) (5 diffs)
-
readme.md (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mailcamp/trunk/README.txt
r2965288 r2965311 5 5 Requires at least: 4.9.1 6 6 Tested up to: 6.3.1 7 Stable tag: 1.5.1 07 Stable tag: 1.5.11 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 22 22 This section describes how to install the plugin and get started using it. 23 23 24 = Version 1.5. 9=24 = Version 1.5.11 = 25 25 1. Unzip our archive and upload the entire mailcamp directory to your `/wp-content/plugins/ directory` 26 26 2. Activate the plugin through the **Plugins** menu in WordPress … … 31 31 32 32 == Changelog == 33 34 == 1.5.11 == 35 * bugfix - backup 33 36 34 37 == 1.5.10 == -
mailcamp/trunk/admin/class-mailcamp-admin.php
r2965288 r2965311 221 221 if(!empty($lists->item)){ 222 222 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' => $list->subscribecount,228 'unsubscribecount' => $list->unsubscribecount,229 'bouncecount' => $list->bouncecount,230 'spf' => $list->spf,231 'dkim' => $list->dkim,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 ), 232 232 ]; 233 233 } … … 600 600 'listname' => htmlentities( $list->name ), 601 601 'shortcode' => 'mailcamp_list_' . intval( $list->listid ), 602 'subscribecount' => $list->subscribecount,603 'unsubscribecount' => $list->unsubscribecount,604 'bouncecount' => $list->bouncecount,605 'spf' => $list->spf,606 'dkim' => $list->dkim,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 ), 607 607 ]; 608 608 } -
mailcamp/trunk/admin/settings-callbacks.php
r2965288 r2965311 528 528 /** @since 1.5.3 */ 529 529 530 function mailcamp_callback_fields_dropdown($fields = [], $field = '', $mappings = []) {530 function mailcamp_callback_fields_dropdown($fields = [], $field, $mappings) { 531 531 532 532 $output = '<select name="mailcamp_options_wc[wc_mapped_fields][' . $field . ']"><option value="">' . __('Select a field', 'mailcamp') . '</option>'; -
mailcamp/trunk/includes/core-functions.php
r2965288 r2965311 44 44 // get the position of the email field (this field is not added yet) 45 45 $email_key_arr = @array_keys( $mailcamp_list_fields, 'email' ); 46 46 47 47 // Create the email field (this field could not be fetched, so we have to create it) 48 48 $email_field = new stdClass(); -
mailcamp/trunk/mailcamp.php
r2965288 r2965311 14 14 * Plugin URI: https://mailcamp.nl/ecommerce/koppel-wordpress-plugin-aan-mailinglijst-in-mailcamp/ 15 15 * Description: MailCamp form plugin. A simple plugin that adds a highly effective subscription form to your site. 16 * Version: 1.5.1 016 * Version: 1.5.11 17 17 * Author: Silas de Rooy 18 18 * Author URI: https://mailcamp.nl … … 33 33 * Rename this for your plugin and update it as you release new versions. 34 34 */ 35 define('MAILCAMP_VERSION', '1.5.1 0');35 define('MAILCAMP_VERSION', '1.5.11'); 36 36 /** 37 37 * The code that runs during plugin activation. -
mailcamp/trunk/public/class-mailcamp-public.php
r2965288 r2965311 149 149 // Check if subscriber already exists 150 150 $mc_api->getSubscriberFromList($custom_fields['email'], $custom_fields['listid']); 151 $msg = (string)$mc_api->result->data;151 $msg = current($mc_api->result->data); 152 152 $insert = false; 153 153 // 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)){ 155 155 // insert subscriber 156 156 $mc_api->insertSubscriber( $custom_fields ); 157 $msg = (string)$mc_api->result->data;157 $msg = current( $mc_api->result->data ); 158 158 $insert = true; 159 159 } … … 165 165 if ( isset( $mc_api->result->data->confirmcode ) ) { 166 166 if(!$insert){ 167 $confirmdate = (string)$mc_api->result->data->confirmdate;168 $requestdate = (string)$mc_api->result->data->requestdate;167 $confirmdate = current($mc_api->result->data->confirmdate); 168 $requestdate = current($mc_api->result->data->requestdate); 169 169 if($confirmdate > 0){ 170 170 // already confirmed inform user … … 181 181 } 182 182 183 $confirmcode = (string)$mc_api->result->data->confirmcode;183 $confirmcode = current( $mc_api->result->data->confirmcode ); 184 184 // the email which subscribed 185 185 $to_email = $custom_fields['email']; … … 400 400 401 401 $mc_api->getSubscriberFromList($email, $list_id); 402 $msg = (string)$mc_api->result->data;402 $msg = current($mc_api->result->data); 403 403 $insert = false; 404 404 405 405 // 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)){ 407 407 408 408 // check for double opt-in … … 413 413 } 414 414 415 $msg = (string)$mc_api->result->data;415 $msg = current( $mc_api->result->data ); 416 416 $insert = true; 417 417 } else { -
mailcamp/trunk/readme.md
r2965288 r2965311 5 5 Requires at least: 4.9.1 6 6 Tested up to: 6.3.1 7 Stable tag: 1.5.1 07 Stable tag: 1.5.11 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 21 21 This section describes how to install the plugin and get started using it. 22 22 23 = Version 1.5. 9=23 = Version 1.5.11 = 24 24 1. Unzip our archive and upload the entire mailcamp directory to your `/wp-content/plugins/ directory` 25 25 2. Activate the plugin through the **Plugins** menu in WordPress … … 30 30 31 31 ## Changelog ## 32 33 ### 1.5.11 ### 34 * bugfix - backup 32 35 33 36 ### 1.5.10 ###
Note: See TracChangeset
for help on using the changeset viewer.