Plugin Directory

Changeset 2123418


Ignore:
Timestamp:
07/15/2019 08:06:25 PM (6 years ago)
Author:
travisnorthcutt
Message:

Version 1.2.0

Location:
convertkit-for-woocommerce/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • convertkit-for-woocommerce/trunk/components/integration/functions/integration.php

    r2052888 r2123418  
    2828            $tags    = ckwc_convertkit_api_get_tags();
    2929
     30            /**
     31             * Alphabetize
     32             */
     33            usort( $courses, function( $a, $b ) {
     34                return strcmp( $a['name'], $b['name'] );
     35            });
     36            usort( $forms, function( $a, $b ) {
     37                return strcmp( $a['name'], $b['name'] );
     38            });
     39            usort( $tags, function( $a, $b ) {
     40                return strcmp( $a['name'], $b['name'] );
     41            });
     42
    3043            if ( ! is_wp_error( $courses ) && ! is_wp_error( $forms ) && ! is_wp_error( $tags ) ) {
    3144                $options = array(
    3245                    array(
    3346                        'key'     => 'course',
    34                         'name'    => __( 'Courses' ),
     47                        'name'    => __( 'Courses', 'woocommerce-convertkit' ),
    3548                        'options' => array_combine(
    3649                            wp_list_pluck( $courses, 'id' ),
     
    4053                    array(
    4154                        'key'     => 'form',
    42                         'name'    => __( 'Forms' ),
     55                        'name'    => __( 'Forms', 'woocommerce-convertkit' ),
    4356                        'options' => array_combine(
    4457                            wp_list_pluck( $forms, 'id' ),
     
    4861                    array(
    4962                        'key'     => 'tag',
    50                         'name'    => __( 'Tags' ),
     63                        'name'    => __( 'Tags', 'woocommerce-convertkit' ),
    5164                        'options' => array_combine(
    5265                            wp_list_pluck( $tags, 'id' ),
     
    6376    }
    6477}
     78
     79function ckwc_force_get_subscription_options() {
     80        $courses = ckwc_convertkit_api_get_courses();
     81        $forms   = ckwc_convertkit_api_get_forms();
     82        $tags    = ckwc_convertkit_api_get_tags();
     83
     84        /**
     85         * Alphabetize
     86         */
     87        usort( $courses, function( $a, $b ) {
     88            return strcmp( $a['name'], $b['name'] );
     89        });
     90        usort( $forms, function( $a, $b ) {
     91            return strcmp( $a['name'], $b['name'] );
     92        });
     93        usort( $tags, function( $a, $b ) {
     94            return strcmp( $a['name'], $b['name'] );
     95        });
     96
     97        if ( ! is_wp_error( $courses ) && ! is_wp_error( $forms ) && ! is_wp_error( $tags ) ) {
     98            $options = array(
     99                array(
     100                    'key'     => 'course',
     101                    'name'    => __( 'Courses', 'woocommerce-convertkit' ),
     102                    'options' => array_combine(
     103                        wp_list_pluck( $courses, 'id' ),
     104                        wp_list_pluck( $courses, 'name' )
     105                    ),
     106                ),
     107                array(
     108                    'key'     => 'form',
     109                    'name'    => __( 'Forms', 'woocommerce-convertkit' ),
     110                    'options' => array_combine(
     111                        wp_list_pluck( $forms, 'id' ),
     112                        wp_list_pluck( $forms, 'name' )
     113                    ),
     114                ),
     115                array(
     116                    'key'     => 'tag',
     117                    'name'    => __( 'Tags', 'woocommerce-convertkit' ),
     118                    'options' => array_combine(
     119                        wp_list_pluck( $tags, 'id' ),
     120                        wp_list_pluck( $tags, 'name' )
     121                    ),
     122                ),
     123            );
     124
     125            ckwc_update_stored_subscription_options( $options );
     126        }
     127
     128    return $options;
     129}
     130
     131function ckwc_update_stored_subscription_options( $options = null ) {
     132    set_transient( 'ckwc_subscription_options', $options, 5 * MINUTE_IN_SECONDS );
     133
     134}
  • convertkit-for-woocommerce/trunk/components/integration/integration.php

    r2052888 r2123418  
    7070    public function __construct() {
    7171        $this->id                 = 'ckwc';
    72         $this->method_title       = __( 'ConvertKit' );
    73         $this->method_description = __( 'Enter your ConvertKit settings below to control how WooCommerce integrates with your ConvertKit account.' );
     72        $this->method_title       = __( 'ConvertKit', 'woocommerce-convertkit' );
     73        $this->method_description = __( 'Enter your ConvertKit settings below to control how WooCommerce integrates with your ConvertKit account.', 'woocommerce-convertkit' );
    7474
    7575        // Initialize form fields
     
    105105            add_action( 'add_meta_boxes_product', array( $this, 'add_meta_boxes' ) );
    106106            add_action( 'save_post_product', array( $this, 'save_product' ) );
     107
     108
     109            add_action( 'wp_ajax_ckwc_refresh_subscription_options', array( $this, 'refresh_subscription_options' ) );
    107110        }
    108111
     
    128131     */
    129132    public function add_meta_boxes( $post ) {
    130         add_meta_box( 'ckwc', __( 'Convert Kit Integration' ), array( $this, 'display_meta_box' ), null, 'side', 'default' );
     133        add_meta_box( 'ckwc', __( 'ConvertKit Integration', 'woocommerce-convertkit' ), array( $this, 'display_meta_box' ), null, 'side', 'default' );
    131134    }
    132135
     
    158161        $this->form_fields = array(
    159162            'enabled' => array(
    160                 'title'       => __( 'Enable/Disable' ),
     163                'title'       => __( 'Enable/Disable', 'woocommerce-convertkit' ),
    161164                'type'        => 'checkbox',
    162                 'label'       => __( 'Enable ConvertKit integration' ),
     165                'label'       => __( 'Enable ConvertKit integration', 'woocommerce-convertkit' ),
    163166                'default'     => 'no',
    164167            ),
    165168
    166169            'event' => array(
    167                 'title'       => __( 'Subscribe Event' ),
     170                'title'       => __( 'Subscribe Event', 'woocommerce-convertkit' ),
    168171                'type'        => 'select',
    169172                'default'     => 'pending',
    170                 'description' => __( 'When should customers be subscribed?' ),
     173                'description' => __( 'When should customers be subscribed?', 'woocommerce-convertkit' ),
    171174                'desc_tip'    => false,
    172175                'options'     => array(
    173                     'pending'    => __( 'Order Created' ),
    174                     'processing' => __( 'Order Processing' ),
    175                     'completed'  => __( 'Order Completed' ),
     176                    'pending'    => __( 'Order Created', 'woocommerce-convertkit' ),
     177                    'processing' => __( 'Order Processing', 'woocommerce-convertkit' ),
     178                    'completed'  => __( 'Order Completed', 'woocommerce-convertkit' ),
    176179                ),
    177180            ),
    178181
    179182            'display_opt_in' => array(
    180                 'title'       => __( 'Display Opt-In Checkbox' ),
    181                 'label'       => __( 'Display an Opt-In checkbox on checkout' ),
     183                'title'       => __( 'Display Opt-In Checkbox', 'woocommerce-convertkit' ),
     184                'label'       => __( 'Display an Opt-In checkbox on checkout', 'woocommerce-convertkit' ),
    182185                'type'        => 'checkbox',
    183186                'default'     => 'no',
    184                 'description' => __( 'If enabled, customers will only be subscribed if the "Opt-In" checkbox presented on checkout is checked.' ),
     187                'description' => __( 'If enabled, customers will only be subscribed if the "Opt-In" checkbox presented on checkout is checked.', 'woocommerce-convertkit' ),
    185188                'desc_tip'    => false,
    186189            ),
    187190
    188191            'opt_in_label' => array(
    189                 'title'       => __( 'Opt-In Checkbox Label' ),
     192                'title'       => __( 'Opt-In Checkbox Label', 'woocommerce-convertkit' ),
    190193                'type'        => 'text',
    191                 'default'     => __( 'I want to subscribe to the newsletter' ),
    192                 'description' => __( 'Optional (only used if the above field is checked): Customize the label next to the opt-in checkbox.' ),
     194                'default'     => __( 'I want to subscribe to the newsletter', 'woocommerce-convertkit' ),
     195                'description' => __( 'Optional (only used if the above field is checked): Customize the label next to the opt-in checkbox.', 'woocommerce-convertkit' ),
    193196                'desc_tip'    => false,
    194197            ),
    195198
    196199            'opt_in_status' => array(
    197                 'title'       => __( 'Opt-In Checkbox<br />Default Status' ),
     200                'title'       => __( 'Opt-In Checkbox<br />Default Status', 'woocommerce-convertkit' ),
    198201                'type'        => 'select',
    199202                'default'     => 'checked',
    200                 'description' => __( 'The default state of the opt-in checkbox' ),
     203                'description' => __( 'The default state of the opt-in checkbox', 'woocommerce-convertkit' ),
    201204                'desc_tip'    => false,
    202205                'options'     => array(
    203                     'checked'   => __( 'Checked' ),
    204                     'unchecked' => __( 'Unchecked' ),
     206                    'checked'   => __( 'Checked', 'woocommerce-convertkit' ),
     207                    'unchecked' => __( 'Unchecked', 'woocommerce-convertkit' ),
    205208                ),
    206209            ),
    207210
    208211            'opt_in_location' => array(
    209                 'title'       => __( 'Opt-In Checkbox<br />Display Location' ),
     212                'title'       => __( 'Opt-In Checkbox<br />Display Location', 'woocommerce-convertkit' ),
    210213                'type'        => 'select',
    211214                'default'     => 'billing',
    212                 'description' => __( 'Where to display the opt-in checkbox on the checkout page (under Billing Info or Order Info).' ),
     215                'description' => __( 'Where to display the opt-in checkbox on the checkout page (under Billing Info or Order Info).', 'woocommerce-convertkit' ),
    213216                'desc_tip'    => false,
    214217                'options'     => array(
    215                     'billing' => __( 'Billing' ),
    216                     'order'   => __( 'Order' ),
     218                    'billing' => __( 'Billing', 'woocommerce-convertkit' ),
     219                    'order'   => __( 'Order', 'woocommerce-convertkit' ),
    217220                ),
    218221            ),
    219222
    220223            'api_key' => array(
    221                 'title'       => __( 'API Key' ),
     224                'title'       => __( 'API Key', 'woocommerce-convertkit' ),
    222225                'type'        => 'text',
    223226                'default'     => '',
    224227                // translators: this is a url to the ConvertKit site.
    225                 'description' => sprintf( __( 'If you already have an account, <a href="%1$s" target="_blank">click here to retrieve your API Key</a>.<br />If you don\'t have a ConvertKit account, you can <a href="%2$s" target="_blank">sign up for one here</a>.' ), esc_attr( esc_html( 'https://app.convertkit.com/account/edit' ) ), esc_attr( esc_url( 'http://convertkit.com/pricing/' ) ) ),
     228                'description' => sprintf( __( 'If you already have an account, <a href="%1$s" target="_blank">click here to retrieve your API Key</a>.<br />If you don\'t have a ConvertKit account, you can <a href="%2$s" target="_blank">sign up for one here</a>.', 'woocommerce-convertkit' ), esc_attr( esc_html( 'https://app.convertkit.com/account/edit' ) ), esc_attr( esc_url( 'http://convertkit.com/pricing/' ) ) ),
    226229                'desc_tip'    => false,
    227230            ),
    228231
    229232            'api_secret' => array(
    230                 'title'       => __( 'API Secret' ),
     233                'title'       => __( 'API Secret', 'woocommerce-convertkit' ),
    231234                'type'        => 'text',
    232235                'default'     => '',
    233236                // translators: this is a url to the ConvertKit site.
    234                 'description' => sprintf( __( 'If you already have an account, <a href="%1$s" target="_blank">click here to retrieve your API Secret</a>.<br />If you don\'t have a ConvertKit account, you can <a href="%2$s" target="_blank">sign up for one here</a>.' ), esc_attr( esc_html( 'https://app.convertkit.com/account/edit' ) ), esc_attr( esc_url( 'http://convertkit.com/pricing/' ) ) ),
     237                'description' => sprintf( __( 'If you already have an account, <a href="%1$s" target="_blank">click here to retrieve your API Secret</a>.<br />If you don\'t have a ConvertKit account, you can <a href="%2$s" target="_blank">sign up for one here</a>', 'woocommerce-convertkit.' ), esc_attr( esc_html( 'https://app.convertkit.com/account/edit' ) ), esc_attr( esc_url( 'http://convertkit.com/pricing/' ) ) ),
    235238                'desc_tip'    => false,
    236239            ),
    237240
    238241            'subscription' => array(
    239                 'title'       => __( 'Subscription' ),
     242                'title'       => __( 'Subscription', 'woocommerce-convertkit' ),
    240243                'type'        => 'subscription',
    241244                'default'     => '',
    242                 'description' => __( 'Customers will be added to the selected item' ),
     245                'description' => __( 'Customers will be added to the selected item', 'woocommerce-convertkit' ),
     246            ),
     247
     248            'refresh_forms' => array(
     249                'title'       => __( 'Refresh forms', 'woocommerce-convertkit' ),
     250                'type'        => 'refresh',
     251                'default'     => '',
     252                'description' => __( 'Refresh forms', 'woocommerce-convertkit' ),
    243253            ),
    244254
    245255            'name_format' => array(
    246                 'title'       => __( 'Name Format' ),
     256                'title'       => __( 'Name Format', 'woocommerce-convertkit' ),
    247257                'type'        => 'select',
    248258                'default'     => 'first',
    249                 'description' => __( 'How should the customer name be sent to ConvertKit?' ),
     259                'description' => __( 'How should the customer name be sent to ConvertKit?', 'woocommerce-convertkit' ),
    250260                'desc_tip'    => false,
    251261                'options'     => array(
    252                     'first'   => __( 'Billing First Name' ),
    253                     'last'    => __( 'Billing Last Name' ),
    254                     'both'    => __( 'Billing First Name + Billing Last Name' ),
     262                    'first'   => __( 'Billing First Name', 'woocommerce-convertkit' ),
     263                    'last'    => __( 'Billing Last Name', 'woocommerce-convertkit' ),
     264                    'both'    => __( 'Billing First Name + Billing Last Name', 'woocommerce-convertkit' ),
    255265                ),
    256266            ),
    257267
    258268            'send_purchases' => array(
    259                 'title'       => __( 'Purchases' ),
    260                 'label'       => __( 'Send purchase data to ConvertKit.' ),
     269                'title'       => __( 'Purchases', 'woocommerce-convertkit' ),
     270                'label'       => __( 'Send purchase data to ConvertKit.', 'woocommerce-convertkit' ),
    261271                'type'        => 'checkbox',
    262272                'default'     => 'no',
    263                 'description' => __( '' ),
     273                'description' => __( '', 'woocommerce-convertkit' ),
    264274                'desc_tip'    => false,
    265275            ),
    266276
    267277            'debug' => array(
    268                 'title'       => __( 'Debug' ),
     278                'title'       => __( 'Debug', 'woocommerce-convertkit' ),
    269279                'type'        => 'checkbox',
    270                 'label'       => __('Write data to a log file'),
    271                 'description' => 'You can view the log file by going to WooCommerce > Status, click the Logs tab, then selecting convertkit.',
     280                'label'       => __('Write data to a log file', 'woocommerce-convertkit'),
     281                'description' => __( 'You can view the log file by going to WooCommerce > Status, click the Logs tab, then selecting convertkit.', 'woocommerce-convertkit' ),
    272282                'default'     => 'no',
    273283            ),
     
    323333                    <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
    324334                    <select class="select <?php echo esc_attr( $data['class'] ); ?>" name="<?php echo esc_attr( $field ); ?>" id="<?php echo esc_attr( $field ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); ?>>
    325                         <option <?php selected( '', $this->get_option( $key ) ); ?> value=""><?php _e( 'Select a subscription option...' ); ?></option>
     335                        <option <?php selected( '', $this->get_option( $key ) ); ?> value=""><?php _e( 'Select a subscription option...', 'woocommerce-convertkit' ); ?></option>
    326336                        <?php foreach ( $options as $option_group ) {
    327337                            if ( empty( $option_group['options'] ) ) {
     
    339349                </fieldset>
    340350                <?php } else { ?>
    341                 <p class="description"><?php _e( 'Please provide a valid ConvertKit API Key.' ); ?></p>
     351                <p class="description"><?php _e( 'Please provide a valid ConvertKit API Key.', 'woocommerce-convertkit' ); ?></p>
    342352                <?php } ?>
    343353            </td>
     
    349359
    350360    /**
     361     * Generates the HTML for the "Refresh subscription options" button on the settings page
     362     *
     363     * @param $key
     364     * @param $data
     365     *
     366     * @return string
     367     */
     368    public function generate_refresh_html( $key, $data ) {
     369        $field    = $this->get_field_key( $key );
     370        $defaults = array(
     371            'title'             => '',
     372            'disabled'          => false,
     373            'class'             => '',
     374            'css'               => '',
     375            'placeholder'       => '',
     376            'type'              => 'text',
     377            'desc_tip'          => false,
     378            'description'       => '',
     379            'custom_attributes' => array(),
     380            'options'           => array(),
     381        );
     382
     383        $data = wp_parse_args( $data, $defaults );
     384
     385        $has_api = isset( $this->api_key ) ? esc_attr( $this->api_key ) : false;
     386
     387        $html = '<input ' . ( $has_api ? '' : 'style="display:none;"' ) . ' type="submit" name="refresh" id="refresh_ckwc_subscription_options" class="button" value="' . __( 'Refresh subscription options', 'convertkit' ) . '"><span id="refreshCKSpinner" class="spinner"></span>';
     388
     389        ob_start();
     390        ?>
     391        <tr valign="top">
     392        <th scope="row" class="titledesc">
     393            <label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label>
     394            <?php echo $this->get_tooltip_html( $data ); ?>
     395        </th>
     396        <td class="forminp">
     397            <?php echo $html; ?>
     398        </td>
     399        <?php
     400
     401        return ob_get_clean();
     402    }
     403
     404    /**
    351405     * @param $settings
    352406     *
     
    369423
    370424        if ( empty( $value ) ) {
    371             $this->errors[ $key ] = __( 'Please provide your ConvertKit API Key.' );
     425            $this->errors[ $key ] = __( 'Please provide your ConvertKit API Key.', 'woocommerce-convertkit' );
    372426        } else {
    373427            $forms = ckwc_convertkit_api_get_forms( $value );
    374428
    375429            if ( is_wp_error( $forms ) ) {
    376                 $this->errors[ $key ] = __( 'Your ConvertKit API Key appears to be invalid. Please double check the value.' );
     430                $this->errors[ $key ] = __( 'Your ConvertKit API Key appears to be invalid. Please double check the value.', 'woocommerce-convertkit' );
    377431            }
    378432        }
     
    630684                    'status'           => 'paid',
    631685                    'products'         => $products,
     686                    'integration'      => 'WooCommerce'
    632687                )
    633688            );
     
    654709    }
    655710
     711    public function refresh_subscription_options() {
     712
     713        $key   = 'subscription';
     714        $field = $this->get_field_key( $key );
     715
     716        if ( ! current_user_can( 'manage_options' ) ) {
     717            wp_send_json_error( __( 'You don\'t have enough permissions.', 'convertkit' ) );
     718            wp_die();
     719        }
     720
     721        delete_transient( 'ckwc_subscription_options' );
     722
     723        $options = ckwc_force_get_subscription_options();
     724
     725        ob_start();
     726
     727        ?>
     728        <select class="select" name="<?php echo esc_attr( $field ); ?>" id="<?php echo esc_attr( $field ); ?>" style="">
     729            <option <?php selected( '', $this->get_option( $key ) ); ?> value=""><?php _e( 'Select a subscription option...', 'woocommerce-convertkit' ); ?></option>
     730            <?php foreach ( $options as $option_group ) {
     731                if ( empty( $option_group['options'] ) ) {
     732                    continue;
     733                } ?>
     734                <optgroup label="<?php echo esc_attr( $option_group['name'] ); ?>">
     735                    <?php foreach ( $option_group['options'] as $id => $name ) {
     736                        $value = "{$option_group['key']}:{$id}"; ?>
     737                        <option <?php selected( $value, $this->get_option( $key ) ); ?> value="<?php echo esc_attr( $value ); ?>"><?php echo esc_html( $name ); ?></option>
     738                    <?php } ?>
     739                </optgroup>
     740            <?php } ?>
     741        </select>
     742        <?php
     743
     744        $html = ob_get_clean();
     745
     746        wp_send_json_success( $html );
     747        wp_die();
     748    }
     749
    656750    /**
    657751     * Write API request results to a debug log
     
    676770
    677771        $plugin_links = array(
    678             '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=integration' ) . '">' . __( 'Settings', 'wc-store-locator' ) . '</a>',
     772            '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=integration&section=ckwc' ) . '">' . __( 'Settings', 'woocommerce-convertkit' ) . '</a>',
    679773        );
    680774
  • convertkit-for-woocommerce/trunk/components/integration/resources/integration.js

    r1451462 r2123418  
    55        $dependents.toggle($(this).prop('checked'));
    66    }).trigger('change');
     7
     8
     9    $(document).on('click', '#refresh_ckwc_subscription_options', refreshSubscriptionOptions);
     10
    711});
     12
     13refreshSubscriptionOptions = function (e) {
     14    e.preventDefault();
     15    startSpinner();
     16    $.ajax({
     17        url: window.ajaxurl,
     18        data: { action: 'ckwc_refresh_subscription_options', api_key: $('#woocommerce_ckwc_api_key').val() },
     19        success: function (resp) {
     20            console.log(resp);
     21            if ( resp.success ) {
     22                $('#woocommerce_ckwc_subscription').replaceWith( resp.data );
     23            } else {
     24                alert( resp.data );
     25            }
     26        },
     27        error: function( resp ) {
     28            alert( resp.statusText );
     29        },
     30        complete: function () {
     31            stopSpinner();
     32        }
     33    });
     34};
     35
     36startSpinner = function () {
     37    $('#refreshCKSpinner').addClass('is-active').css('float', 'none');
     38};
     39
     40stopSpinner = function () {
     41    $('#refreshCKSpinner').removeClass('is-active');
     42};
  • convertkit-for-woocommerce/trunk/components/integration/views/meta-box.php

    r1711134 r2123418  
    11<?php if ( 'yes' !== $this->enabled || empty( $this->api_key ) ) { ?>
    22<p>
    3     <strong><?php esc_html_e( 'Important:' ); ?></strong>
    4     <?php esc_html_e( 'The ConvertKit integration for WooCommerce is currently disabled. Customers will not be subscribed when purchasing.' ); ?>
     3    <strong><?php esc_html_e( 'Important:', 'woocommerce-convertkit' ); ?></strong>
     4    <?php esc_html_e( 'The ConvertKit integration for WooCommerce is currently disabled. Customers will not be subscribed when purchasing.', 'woocommerce-convertkit' ); ?>
    55</p>
    66<?php } ?>
     
    88<?php if ( $options ) { ?>
    99<select class="widefat" id="ckwc_subscription" name="ckwc_subscription">
    10     <option <?php selected( '', $subscription ); ?> value=""><?php esc_html_e( 'Select a subscription option...' ); ?></option>
     10    <option <?php selected( '', $subscription ); ?> value=""><?php esc_html_e( 'Select a subscription option...', 'woocommerce-convertkit' ); ?></option>
    1111    <?php foreach ( $options as $option_group ) { if ( empty( $option_group['options'] ) ) { continue; } ?>
    1212    <optgroup label="<?php echo esc_attr( $option_group['name'] ); ?>">
     
    2020<?php } else { ?>
    2121<p>
    22     <?php esc_html_e( 'Please enter a valid ConvertKit API Key on the ConvertKit Integration Settings page.' ); ?>
     22    <?php esc_html_e( 'Please enter a valid ConvertKit API Key on the ConvertKit Integration Settings page.', 'woocommerce-convertkit' ); ?>
    2323</p>
    2424<?php } ?>
  • convertkit-for-woocommerce/trunk/functions/convertkit.php

    r1917852 r2123418  
    4242
    4343        if ( is_null( $response_data ) ) {
    44             return new WP_Error( 'parse_failed', __( 'Could not parse response from ConvertKit' ) );
     44            return new WP_Error( 'parse_failed', __( 'Could not parse response from ConvertKit', 'woocommerce-convertkit' ) );
    4545        } elseif ( isset( $response_data['error'] ) && isset( $response_data['message'] ) ) {
    4646            return new WP_Error( $response_data['error'], $response_data['message'] );
  • convertkit-for-woocommerce/trunk/readme.txt

    r2052888 r2123418  
    44Tags: email, marketing, embed form, convertkit, capture, woocommerce
    55Requires at least: 3.6
    6 Tested up to: 5.1.1
    7 Stable tag: 1.1.0
     6Tested up to: 5.2.2
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53### 1.2.0  2019-07-15
     54
     55* Improve plugin's translation readiness
     56* Make plugin settings link work with other WooCommerce addons
     57* Correct product metabox title
     58* Display tags/forms/sequences alphabetically
     59* Add ability to force-refresh subscription options
     60* Add integration name to purchase API requests
     61
    5362### 1.1.0  2019-03-15
    5463
  • convertkit-for-woocommerce/trunk/woocommerce-convertkit.php

    r2052888 r2123418  
    44 * Plugin URI:  https://www.convertkit.com
    55 * Description: Integrates WooCommerce with ConvertKit allowing customers to be automatically sent to your ConvertKit account.
    6  * Version: 1.1.0
     6 * Version: 1.2.0
    77 * Author: ConvertKit
    88 * Author URI: https://www.convertkit.com
     
    2929
    3030if ( ! defined( 'CKWC_VERSION' ) ) {
    31     define( 'CKWC_VERSION', '1.1.0' );
     31    define( 'CKWC_VERSION', '1.2.0' );
    3232}
    3333
Note: See TracChangeset for help on using the changeset viewer.