Changeset 3418339
- Timestamp:
- 12/12/2025 02:03:33 PM (4 months ago)
- Location:
- woo-order-export-constant-contact
- Files:
-
- 21 added
- 4 edited
-
tags/1.2.5 (added)
-
tags/1.2.5/includes (added)
-
tags/1.2.5/includes/source (added)
-
tags/1.2.5/includes/source/css (added)
-
tags/1.2.5/includes/source/css/admin-style.css (added)
-
tags/1.2.5/includes/source/images (added)
-
tags/1.2.5/includes/source/images/arrow_down.png (added)
-
tags/1.2.5/includes/source/images/arrow_up.png (added)
-
tags/1.2.5/includes/source/images/bgnoise_lg.jpg (added)
-
tags/1.2.5/includes/source/images/export.png (added)
-
tags/1.2.5/includes/source/images/loading.gif (added)
-
tags/1.2.5/includes/source/images/tick.png (added)
-
tags/1.2.5/includes/source/js (added)
-
tags/1.2.5/includes/source/js/wps-cc-woo-api.js (added)
-
tags/1.2.5/includes/wps-cc-woo-admin.php (added)
-
tags/1.2.5/includes/wps-cc-woo-function.php (added)
-
tags/1.2.5/includes/wps-cc-woo-main.php (added)
-
tags/1.2.5/index.php (added)
-
tags/1.2.5/languages (added)
-
tags/1.2.5/readme.txt (added)
-
trunk/includes/wps-cc-woo-admin.php (modified) (9 diffs)
-
trunk/includes/wps-cc-woo-function.php (modified) (1 diff)
-
trunk/index.php (modified) (2 diffs)
-
trunk/languages (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-order-export-constant-contact/trunk/includes/wps-cc-woo-admin.php
r1956126 r3418339 27 27 } 28 28 public static function add_settings_tab( $settings_tabs ) { 29 $settings_tabs['wps_constant_contact_woo'] = __( 'Constant Contact', 'woo commerce-settings-tab-demo' );29 $settings_tabs['wps_constant_contact_woo'] = __( 'Constant Contact', 'woo-order-export-constant-contact' ); 30 30 return $settings_tabs; 31 31 } … … 47 47 $settings = array( 48 48 'section_title' => array( 49 'name' => __( 'Constant Contact', 'w ps-cc-woo-lan' ),49 'name' => __( 'Constant Contact', 'woo-order-export-constant-contact' ), 50 50 'type' => 'title', 51 51 'desc' => 'Put exact value into below fields and Save Changes, for adding the user details into your selected Constant Contact list', … … 53 53 ), 54 54 'order_status' => array( 55 'name' => __( 'Order Status', 'w ps-cc-woo-lan' ),55 'name' => __( 'Order Status', 'woo-order-export-constant-contact' ), 56 56 'type' => 'select', 57 57 'options' => array('processing' => 'Order Processing', 'completed' => 'Order Complete' ), 58 58 'default' => 'processing', 59 59 'value' => $wc_wps_constant_contact_woo_order_status, 60 'desc' => __( 'On which order status automatic export process will take place. ( Available with Premium Version Only ) <a href="https://www.wpsuperiors.com/shop/constant-contact-for-woocommerce" target="_blank;">Get Premium Version.</a>', 'w ps-cc-woo-lan' ),60 'desc' => __( 'On which order status automatic export process will take place. ( Available with Premium Version Only ) <a href="https://www.wpsuperiors.com/shop/constant-contact-for-woocommerce" target="_blank;">Get Premium Version.</a>', 'woo-order-export-constant-contact' ), 61 61 'id' => 'wc_wps_constant_contact_woo_order_status' 62 62 ), 63 63 'api_key' => array( 64 'name' => __( 'API Key', 'w ps-cc-woo-lan' ),64 'name' => __( 'API Key', 'woo-order-export-constant-contact' ), 65 65 'type' => 'text', 66 'desc' => __( 'How to get the API Key? <a href="https://www.wpsuperiors.com/knowledge-base/constantcontact-setup/" target="_blank;"> Click Here</a>', 'wps-cc-woo-lan' ),67 66 'id' => 'wc_wps_constant_contact_woo_api_key' 68 67 ), 69 68 'access_token' => array( 70 'name' => __( 'Access Token', 'w ps-cc-woo-lan' ),69 'name' => __( 'Access Token', 'woo-order-export-constant-contact' ), 71 70 'type' => 'text', 72 'desc' => __( 'How to get the Access Token? <a href="https://www.wpsuperiors.com/knowledge-base/constantcontact-setup/" target="_blank;"> Click Here</a>', 'wps-cc-woo-lan' ),73 71 'id' => 'wc_wps_constant_contact_woo_access_token' 74 72 ), 75 73 'list_id' => array( 76 'name' => __( 'Lists', 'w ps-cc-woo-lan' ),74 'name' => __( 'Lists', 'woo-order-export-constant-contact' ), 77 75 'type' => 'select', 78 76 'options'=> $lists, 79 77 'value' => $wc_wps_constant_contact_woo_list_id, 80 'desc' => __( '<br/>Put proper API Key, Access Token and click Save Changes button. <br/>These lists are automatic captured from your Constant Contact account.<br/>Choose on which list you want to add the woocommerce users.<br/>( For FREE version only one list captured and can be used at a time.<br/>All lists of your Constant Contact account can be captured and used with PREMIUM version only.)<p style="display: inline-block; margin-top: 7%;"><a href="https://www.wpsuperiors.com/shop/constant-contact-for-woocommerce" target="_blank;">Get Premium Version.</a></p>', 'w ps-cc-woo-lan' ),78 'desc' => __( '<br/>Put proper API Key, Access Token and click Save Changes button. <br/>These lists are automatic captured from your Constant Contact account.<br/>Choose on which list you want to add the woocommerce users.<br/>( For FREE version only one list captured and can be used at a time.<br/>All lists of your Constant Contact account can be captured and used with PREMIUM version only.)<p style="display: inline-block; margin-top: 7%;"><a href="https://www.wpsuperiors.com/shop/constant-contact-for-woocommerce" target="_blank;">Get Premium Version.</a></p>', 'woo-order-export-constant-contact' ), 81 79 'id' => 'wc_wps_constant_contact_woo_list_id' 82 80 ), … … 95 93 } 96 94 public static function get_cc_lists(){ 97 $key = get_option('wc_wps_constant_contact_woo_api_key') ? get_option('wc_wps_constant_contact_woo_api_key') : '';95 $key = 'b81d258d-3dc5-4091-b8aa-62d18de56e7f';//get_option('wc_wps_constant_contact_woo_api_key') ? get_option('wc_wps_constant_contact_woo_api_key') : ''; 98 96 $token = get_option('wc_wps_constant_contact_woo_access_token') ? get_option('wc_wps_constant_contact_woo_access_token') : ''; 99 97 if( $key != '' && $token != '' ){ 100 $curl = curl_init('https://api.constantcontact.com/v2/lists?api_key='.$key);101 $header = array(102 'Authorization: Bearer '.$token103 );104 curl_setopt($curl, CURLOPT_HTTPHEADER, $header);105 curl_setopt($curl, CURLOPT_TIMEOUT, 10);106 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);107 curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);108 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);109 $response = curl_exec($curl);110 curl_close($curl);111 $result = json_decode($response, true);112 113 if( $result && is_array($result) ) {114 $option = array();115 foreach( $result as $list ){116 if (is_array($list)) {117 if (array_key_exists('id', $list) && array_key_exists('name', $list)) {118 $key = $list['id'];119 $value = $list['name'];120 $option[$key] = $value;98 $curl = curl_init('https://api.constantcontact.com/v2/lists?api_key='.$key); 99 $header = array( 100 'Authorization: Bearer '.$token 101 ); 102 curl_setopt($curl, CURLOPT_HTTPHEADER, $header); 103 curl_setopt($curl, CURLOPT_TIMEOUT, 10); 104 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 105 curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); 106 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); 107 $response = curl_exec($curl); 108 curl_close($curl); 109 $result = json_decode($response, true); 110 111 if( $result && is_array($result) ) { 112 $option = array(); 113 foreach( $result as $list ){ 114 if (is_array($list)) { 115 if (array_key_exists('id', $list) && array_key_exists('name', $list)) { 116 $key = $list['id']; 117 $value = $list['name']; 118 $option[$key] = $value; 121 119 break; 122 }else{123 $option[0] = 'No list found';124 }125 126 }else{127 $option[0] = 'No list found';128 }129 130 }131 }132 }else{133 $option[0] = 'No list found';134 }135 return $option;120 }else{ 121 $option[0] = 'No list found'; 122 } 123 124 }else{ 125 $option[0] = 'No list found'; 126 } 127 128 } 129 } 130 }else{ 131 $option[0] = 'No list found'; 132 } 133 return $option; 136 134 } 137 135 … … 144 142 <script type="text/javascript"> 145 143 jQuery(document).ready(function ($) { 146 var imp = $('<option>').val('import_to_cc').text('<?php _ e('Send to ConstantContact', 'woocommerce') ?>');144 var imp = $('<option>').val('import_to_cc').text('<?php __('Send to ConstantContact', 'woo-order-export-constant-contact') ?>'); 147 145 $('#bulk-action-selector-top').append(imp); 148 146 … … 152 150 return; 153 151 var parent = $(this).parent(); 154 parent.html("<i>Please wait, sending...</i><br/><img src='<?php echo WPS_CC_WOO_IMG; ?>/loading.gif' />");152 parent.html("<i>Please wait, sending...</i><br/><img src='<?php echo esc_attr(WPS_CC_WOO_IMG); ?>/loading.gif' />"); 155 153 var data = { 156 154 'action': 'wps_send_single_order_to_cc', … … 171 169 $order_id = $_POST['orderid']; 172 170 WPS_CC_WOO_Functions::subscribe_order_data($order_id); 173 echo "<img src='".WPS_CC_WOO_IMG."/tick.png' /><br><i>Done. View <a href='".admin_url('admin.php?page=wc-settings&tab=wps_constant_contact_woo')."' target='_blank;'>Debug Log</a> for details.</i>"; 171 $msg = "<img src='".WPS_CC_WOO_IMG."/tick.png' /><br><i>Done. View <a href='".admin_url('admin.php?page=wc-settings&tab=wps_constant_contact_woo')."' target='_blank;'>Debug Log</a> for details.</i>"; 172 echo esc_attr($msg); 174 173 die; 175 174 } … … 179 178 function wpc_woo_cc_id_order_column( $columns ) { 180 179 181 $columns['cc_id'] = __( 'ConstactContact Subscribe ID', 'woo commerce' );180 $columns['cc_id'] = __( 'ConstactContact Subscribe ID', 'woo-order-export-constant-contact' ); 182 181 183 182 return $columns; … … 191 190 if ( $column == 'cc_id' ) { 192 191 if( get_post_meta($post->ID,'constant_contact_id',true) ){ 193 echo get_post_meta($post->ID,'constant_contact_id',true);192 echo esc_attr(get_post_meta($post->ID,'constant_contact_id',true)); 194 193 }else{ 195 194 ?> 196 <div class="wps_cc_sub_id_column" data-order-id="<?php echo $post->ID; ?>">195 <div class="wps_cc_sub_id_column" data-order-id="<?php echo esc_attr( $post->ID ); ?>"> 197 196 <a href="javascript:void(0)" class="button-primary">Send to ConstactContact</a> 198 197 </div> -
woo-order-export-constant-contact/trunk/includes/wps-cc-woo-function.php
r2428000 r3418339 14 14 } 15 15 }else{ 16 echo "Configuration error exists. Please check the API Token, Access Token from <a href='".admin_url('admin.php?page=wc-settings&tab=wps_constant_contact_woo')."' target='_blank;'>Debug Log</a> for details.</i> "; 16 $msg = "Configuration error exists. Please check the API Token, Access Token from <a href='".admin_url('admin.php?page=wc-settings&tab=wps_constant_contact_woo')."' target='_blank;'>Debug Log</a> for details.</i> "; 17 echo esc_attr($msg); 17 18 exit; 18 19 } -
woo-order-export-constant-contact/trunk/index.php
r3406105 r3418339 1 1 <?php 2 2 /* 3 Plugin Name: Order Export F rom WooCommerce To Constant Contact (FREE)3 Plugin Name: Order Export For WooCommerce To Constant Contact 4 4 Plugin URI: https://www.wpsuperiors.com/woo-order-export-to-constant-contact 5 5 Description: Export order data from WooCommerce to your Constant Conatct account's email list. 6 Version: 1.2. 46 Version: 1.2.5 7 7 Author: WPSuperiors 8 Text Domain: woo-order-export-constant-contact 9 Domain Path: /languages 10 License: GPLv3 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html 12 Requires at least: 6.3 13 Requires Plugins: woocommerce 8 14 */ 9 15 if ( ! defined( 'ABSPATH' ) ) { … … 58 64 function wps_cc_woo_action_links_free($links){ 59 65 $plugin_links = array( 60 '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=wps_constant_contact_woo' ) . '">' . __( 'Settings' ) . '</a>',61 '<a href="https://www.wpsuperiors.com/woo-order-export-to-constant-contact">' . __( 'Get Premium Version' ) . '</a>',62 '<a href="https://www.wpsuperiors.com/knowledge-base/constantcontact-setup/">' . __( 'Documentation' ) . '</a>',63 '<a href="https://www.wpsuperiors.com/contact-us/">' . __( 'Get Support' ) . '</a>',66 '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=wps_constant_contact_woo' ) . '">' . __( 'Settings','woo-order-export-constant-contact') . '</a>', 67 '<a href="https://www.wpsuperiors.com/woo-order-export-to-constant-contact">' . __( 'Get Premium Version','woo-order-export-constant-contact' ) . '</a>', 68 '<a href="https://www.wpsuperiors.com/knowledge-base/constantcontact-setup/">' . __( 'Documentation','woo-order-export-constant-contact') . '</a>', 69 '<a href="https://www.wpsuperiors.com/contact-us/">' . __( 'Get Support','woo-order-export-constant-contact') . '</a>', 64 70 ); 65 71 return array_merge( $plugin_links, $links ); -
woo-order-export-constant-contact/trunk/readme.txt
r3406105 r3418339 1 === Order Export From WooCommerce To Constant Contact (FREE)===1 === Woo Order Order Export For WooCommerce To Constant Contact=== 2 2 Contributors: WPSuperiors, amitwpdeveloper 3 3 Donate link: http://www.wpsuperiors.com/donate/ 4 4 Tags: woocommerce order export to constant contact, woocommerce constant contact, constant contact woocommerce, constant contact for woocommerce. 5 Requires at least: 3.0.15 Requires at least: 6.3 6 6 Tested up to: 6.9 7 Stable tag: 6.4.1 7 Stable tag: 1.2.5 8 License: GPLv3 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html 8 10 9 11 Woo order export to constant contact plugin export users data from woocommerce order and merge into constant contact. … … 73 75 74 76 == Changelog == 77 = 1.2.5 - 12th Dec, 2025 = 78 *Compatibility update* 79 75 80 = 1.2.3 - 03rd Nov, 2025 = 76 81 *WooCommerce compatibility update and plugin rename.*
Note: See TracChangeset
for help on using the changeset viewer.