Plugin Directory

Changeset 3418339


Ignore:
Timestamp:
12/12/2025 02:03:33 PM (4 months ago)
Author:
amitwpdeveloper
Message:

1.2.5 update.

Location:
woo-order-export-constant-contact
Files:
21 added
4 edited

Legend:

Unmodified
Added
Removed
  • woo-order-export-constant-contact/trunk/includes/wps-cc-woo-admin.php

    r1956126 r3418339  
    2727    }
    2828    public static function add_settings_tab( $settings_tabs ) {
    29         $settings_tabs['wps_constant_contact_woo'] = __( 'Constant Contact', 'woocommerce-settings-tab-demo' );
     29        $settings_tabs['wps_constant_contact_woo'] = __( 'Constant Contact', 'woo-order-export-constant-contact' );
    3030        return $settings_tabs;
    3131    }
     
    4747        $settings = array(
    4848            'section_title' => array(
    49                 'name'     => __( 'Constant Contact', 'wps-cc-woo-lan' ),
     49                'name'     => __( 'Constant Contact', 'woo-order-export-constant-contact' ),
    5050                'type'     => 'title',
    5151                'desc'     => 'Put exact value into below fields and Save Changes, for adding the user details into your selected Constant Contact list',
     
    5353            ),
    5454            'order_status' => array(
    55                 'name' => __( 'Order Status', 'wps-cc-woo-lan' ),
     55                'name' => __( 'Order Status', 'woo-order-export-constant-contact' ),
    5656                'type' => 'select',
    5757                'options' => array('processing' => 'Order Processing', 'completed' => 'Order Complete' ),
    5858                'default' => 'processing',
    5959                '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>', 'wps-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' ),
    6161                'id'   => 'wc_wps_constant_contact_woo_order_status'
    6262            ),
    6363            'api_key' => array(
    64                 'name' => __( 'API Key', 'wps-cc-woo-lan' ),
     64                'name' => __( 'API Key', 'woo-order-export-constant-contact' ),
    6565                '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' ),
    6766                'id'   => 'wc_wps_constant_contact_woo_api_key'
    6867            ),
    6968            'access_token' => array(
    70                 'name' => __( 'Access Token', 'wps-cc-woo-lan' ),
     69                'name' => __( 'Access Token', 'woo-order-export-constant-contact' ),
    7170                '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' ),
    7371                'id'   => 'wc_wps_constant_contact_woo_access_token'
    7472            ),
    7573            'list_id' => array(
    76                 'name' => __( 'Lists', 'wps-cc-woo-lan' ),
     74                'name' => __( 'Lists', 'woo-order-export-constant-contact' ),
    7775                'type' => 'select',
    7876                'options'=> $lists,
    7977                '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>', 'wps-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' ),
    8179                'id'   => 'wc_wps_constant_contact_woo_list_id'
    8280            ),
     
    9593    }
    9694    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') : '';
    9896        $token = get_option('wc_wps_constant_contact_woo_access_token') ? get_option('wc_wps_constant_contact_woo_access_token') : '';
    9997        if( $key != '' && $token != '' ){
    100             $curl = curl_init('https://api.constantcontact.com/v2/lists?api_key='.$key);
    101             $header = array(
    102                 'Authorization: Bearer '.$token
    103             );
    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;
    121119                            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;
    136134    }
    137135
     
    144142            <script type="text/javascript">
    145143                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') ?>');
    147145                    $('#bulk-action-selector-top').append(imp);
    148146
     
    152150                            return;
    153151                        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' />");
    155153                        var data = {
    156154                            'action': 'wps_send_single_order_to_cc',
     
    171169        $order_id = $_POST['orderid'];
    172170        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);
    174173        die;
    175174    }
     
    179178function wpc_woo_cc_id_order_column( $columns ) {
    180179
    181     $columns['cc_id'] = __( 'ConstactContact Subscribe ID', 'woocommerce' );
     180    $columns['cc_id'] = __( 'ConstactContact Subscribe ID', 'woo-order-export-constant-contact' );
    182181
    183182    return $columns;
     
    191190    if (  $column == 'cc_id' ) {
    192191        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));
    194193        }else{
    195194            ?>
    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 ); ?>">
    197196                <a href="javascript:void(0)" class="button-primary">Send to ConstactContact</a>
    198197            </div>
  • woo-order-export-constant-contact/trunk/includes/wps-cc-woo-function.php

    r2428000 r3418339  
    1414            }
    1515        }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);
    1718            exit;
    1819        }
  • woo-order-export-constant-contact/trunk/index.php

    r3406105 r3418339  
    11<?php
    22/*
    3 Plugin Name: Order Export From WooCommerce To Constant Contact (FREE)
     3Plugin Name: Order Export For WooCommerce To Constant Contact
    44Plugin URI: https://www.wpsuperiors.com/woo-order-export-to-constant-contact
    55Description: Export order data from WooCommerce to your Constant Conatct account's email list.
    6 Version: 1.2.4
     6Version: 1.2.5
    77Author: WPSuperiors
     8Text Domain: woo-order-export-constant-contact
     9Domain Path: /languages
     10License: GPLv3
     11License URI: https://www.gnu.org/licenses/gpl-3.0.html
     12Requires at least: 6.3
     13Requires Plugins: woocommerce
    814*/
    915if ( ! defined( 'ABSPATH' ) ) {
     
    5864function wps_cc_woo_action_links_free($links){
    5965    $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>',
    6470        );
    6571    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===
    22Contributors: WPSuperiors, amitwpdeveloper
    33Donate link: http://www.wpsuperiors.com/donate/
    44Tags: woocommerce order export to constant contact, woocommerce constant contact, constant contact woocommerce, constant contact for woocommerce.
    5 Requires at least: 3.0.1
     5Requires at least: 6.3
    66Tested up to: 6.9
    7 Stable tag: 6.4.1
     7Stable tag: 1.2.5
     8License: GPLv3
     9License URI: https://www.gnu.org/licenses/gpl-3.0.html
    810
    911Woo order export to constant contact plugin export users data from woocommerce order and merge into constant contact.
     
    7375
    7476== Changelog ==
     77= 1.2.5 - 12th Dec, 2025 =
     78*Compatibility update*
     79
    7580= 1.2.3 - 03rd Nov, 2025 =
    7681*WooCommerce compatibility update and plugin rename.*
Note: See TracChangeset for help on using the changeset viewer.