Changeset 3367881
- Timestamp:
- 09/25/2025 02:25:24 PM (6 months ago)
- Location:
- ultimate-addons-for-contact-form-7/trunk
- Files:
-
- 1 deleted
- 4 edited
-
addons/mailchimp/mailchimp.php (modified) (5 diffs)
-
admin/tf-options/fields/select2/UACF7_select2.php (modified) (2 diffs)
-
appsero.json (deleted)
-
readme.txt (modified) (2 diffs)
-
ultimate-addons-for-contact-form-7.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-addons-for-contact-form-7/trunk/addons/mailchimp/mailchimp.php
r3333753 r3367881 5 5 class UACF7_MAILCHIMP { 6 6 7 public $mailchimlConnection = '';8 public static $mailchimp= null;9 private $mailchimp_api = '';7 public $mailchimlConnection = ''; 8 public static $mailchimp = null; 9 private $mailchimp_api = ''; 10 10 11 11 public function __construct() { … … 140 140 141 141 $response = json_decode( $response, true ); 142 143 142 if ( isset( $response['lists'] ) && is_array( $response['lists'] ) ) { 144 143 foreach ( $response['lists'] as $list ) { … … 294 293 'field_width' => '25', 295 294 'dependency' => [ 'uacf7_mailchimp_form_enable', '==', '1' ], 295 ), 296 'uacf7_mailchimp_subscriber_tags' => array( 297 'id' => 'uacf7_mailchimp_subscriber_tags', 298 'type' => 'select2', 299 'label' => __( 'Tags To Add', 'ultimate-addons-cf7' ), 300 'subtitle' => 'Add tags to your subscribers. These tags will be added from your mailchimp tag list.', 301 'query_args' => array( 302 'post_id' => $post_id, 303 'specific' => 'text', 304 ), 305 'options' => 'mailchimp_tags', 306 'field_width' => '100', 307 'multiple' => true, 308 'is_pro' => true, 309 'dependency' => [ 'uacf7_mailchimp_form_enable', '==', '1' ], 296 310 ), 297 311 'uacf7_mailchimp_merge_fields' => array( … … 462 476 $subscriber_lname = isset( $mailchimp['uacf7_mailchimp_subscriber_lname'] ) ? $mailchimp['uacf7_mailchimp_subscriber_lname'] : ''; 463 477 $subscriber_lname = ! empty( $subscriber_lname ) ? $posted_data[ $subscriber_lname ] : ''; 464 465 $extra_fields = isset( $mailchimp['uacf7_mailchimp_merge_fields'] ) && is_array( $mailchimp['uacf7_mailchimp_merge_fields'] ) ? $mailchimp['uacf7_mailchimp_merge_fields'] : array();478 $subscriber_tags = isset( $mailchimp['uacf7_mailchimp_subscriber_tags'] ) ? $mailchimp['uacf7_mailchimp_subscriber_tags'] : []; 479 $extra_fields = isset( $mailchimp['uacf7_mailchimp_merge_fields'] ) && is_array( $mailchimp['uacf7_mailchimp_merge_fields'] ) ? $mailchimp['uacf7_mailchimp_merge_fields'] : array(); 466 480 467 481 $extra_merge_fields = ''; … … 515 529 516 530 curl_close( $curl ); 531 532 do_action( 533 'uacf7_mailchimp_after_subscribe', 534 $id, // Form ID 535 $audience, // List ID 536 $subscriber_email, // Subscriber email 537 $subscriber_tags, // Tags array 538 $headers, // cURL headers 539 $server_prefix // Server prefix 540 ); 541 517 542 return $resp; 518 543 } else { -
ultimate-addons-for-contact-form-7/trunk/admin/tf-options/fields/select2/UACF7_select2.php
r3333753 r3367881 86 86 } 87 87 88 if ( ! empty( $args['query_args'] ) && $args['options'] == 'mailchimp_tags' ) { 89 $post_id = isset( $args['query_args']['post_id'] ) ? (int) $args['query_args']['post_id'] : 0; 90 $args['options'] = []; 91 92 if ( $post_id > 0 ) { 93 94 $addon_option = get_option( 'uacf7_settings' ); 95 $uacf7_existing_plugin_status = get_option( 'uacf7_existing_plugin_status' ); 88 96 89 $field_name = !empty($this->field['multiple']) ? $this->field_name() . '[]' : $this->field_name(); 97 if ( apply_filters( 'uacf7_checked_license_status', '' ) == false || $uacf7_existing_plugin_status != 'done' ) { 98 return; 99 } 100 //Addon - Addon mailchimp pro is enabled 101 if ( isset( $addon_option['uacf7_enable_mailchimp_pro'] ) && $addon_option['uacf7_enable_mailchimp_pro'] != true ) { 102 return; 103 } 104 // Get API key 105 $api_key = uacf7_settings( 'uacf7_mailchimp_api_key' ); // adjust option name 106 // Get selected audience for this form 107 $mailchimp = uacf7_get_form_option( $post_id, 'mailchimp' ); 108 $audience_id = isset( $mailchimp['uacf7_mailchimp_audience'] ) ? $mailchimp['uacf7_mailchimp_audience'] : ''; 109 110 if ( $api_key && $audience_id ) { 111 $path = "lists/$audience_id/tag-search?count=100"; 112 $response = $this->set_config( $api_key, $path ); 113 $response = json_decode( $response, true ); 114 115 if ( ! empty( $response['tags'] ) && is_array( $response['tags'] ) ) { 116 foreach ( $response['tags'] as $tag ) { 117 $args['options'][ $tag['name'] ] = $tag['name']; 118 } 119 } 120 } 121 } 122 } 123 124 $field_name = !empty($this->field['multiple']) ? $this->field_name() . '[]' : $this->field_name(); 90 125 $tf_select2_unique_id = str_replace( array("[","]"),"_",esc_attr( $this->field_name() ) ); 91 $parent_class = ( ! empty( $this->parent_field ) ) ? 'tf-select2-parent' : 'tf-select2';92 $parent_class = ( isset( $this->field['select2'] ) ) ? 'tf-select2' : $parent_class ;126 $parent_class = ( ! empty( $this->parent_field ) ) ? 'tf-select2-parent' : 'tf-select2'; 127 $parent_class = ( isset( $this->field['select2'] ) ) ? 'tf-select2' : $parent_class ; 93 128 94 129 echo '<select name="' . $field_name . '" id="' . $tf_select2_unique_id . '" class=" tf-select-two '.$parent_class.' " data-placeholder="' . esc_attr( $placeholder ) . '" ' . $multiple . ' '. $this->field_attributes() .'>'; … … 122 157 } 123 158 159 private function set_config( $api_key = '', $path = '' ) { 160 161 $server_prefix = explode( "-", $api_key ); 162 163 if ( ! isset( $server_prefix[1] ) ) { 164 return; 165 } 166 $server_prefix = $server_prefix[1]; 167 168 $url = "https://$server_prefix.api.mailchimp.com/3.0/$path"; 169 170 $curl = curl_init( $url ); 171 curl_setopt( $curl, CURLOPT_URL, $url ); 172 curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true ); 173 174 $headers = array( 175 "Authorization: Bearer $api_key" 176 ); 177 curl_setopt( $curl, CURLOPT_HTTPHEADER, $headers ); 178 //for debug only! 179 curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, false ); 180 curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false ); 181 182 $resp = curl_exec( $curl ); 183 curl_close( $curl ); 184 185 return $resp; 186 } 187 124 188 } 125 189 } -
ultimate-addons-for-contact-form-7/trunk/readme.txt
r3366254 r3367881 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 3.5.2 87 Stable tag: 3.5.29 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 482 482 == Changelog == 483 483 484 = 3.5.29 - 25/09/2025 = 485 486 - Added: Mailchimp tags selection feature (Pro). 487 - Fixed: Deprecated issue in drag and drop multiple file uploads. 488 484 489 = 3.5.28 - 23/09/2025 = 485 490 -
ultimate-addons-for-contact-form-7/trunk/ultimate-addons-for-contact-form-7.php
r3366254 r3367881 4 4 * Plugin URI: https://cf7addons.com/ 5 5 * Description: 50+ Essential Addons for Contact Form 7 - Conditional Fields, Multi Step Forms, Redirection, Form Templates, Columns, WooCommerce, Mailchimp and more, all in one. 6 * Version: 3.5.2 86 * Version: 3.5.29 7 7 * Author: Themefic 8 8 * Author URI: https://themefic.com/ … … 31 31 define( 'UACF7_PATH', plugin_dir_path( __FILE__ ) ); 32 32 33 define( 'UACF7_VERSION', '3.5.2 8' );33 define( 'UACF7_VERSION', '3.5.29' ); 34 34 35 35 if ( ! class_exists( 'Appsero\Client' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.