Plugin Directory

Changeset 2215780


Ignore:
Timestamp:
12/20/2019 03:02:39 PM (6 years ago)
Author:
travisnorthcutt
Message:

Version 1.9.1

Location:
convertkit
Files:
79 added
7 edited

Legend:

Unmodified
Added
Removed
  • convertkit/trunk/admin/section/class-convertkit-settings-general.php

    r2213878 r2215780  
    3535        }
    3636
    37         $api_key = isset( $_REQUEST['api_key'] ) ? $_REQUEST['api_key'] : WP_ConvertKit::get_api_key();
    38 
    39         if ( ! $api_key ) {
     37        $api_key    = isset( $_REQUEST['api_key'] ) ? $_REQUEST['api_key'] : WP_ConvertKit::get_api_key();
     38        $api_secret = isset( $_REQUEST['api_secret'] ) ? $_REQUEST['api_secret'] : WP_ConvertKit::get_api_secret();
     39
     40        if ( !$api_key ) {
    4041            update_option( 'convertkit_forms', array() );
    41             wp_send_json_error( __( 'There is no API key.', 'convertkit' ) );
     42            wp_send_json_error( __( 'Please enter your API key, click "save changes", and try again.', 'convertkit' ) );
    4243            wp_die();
    4344        }
    4445
    45         $update_resources = $this->api->update_resources( $api_key );
     46        if ( !$api_secret ) {
     47            update_option( 'convertkit_forms', array() );
     48            wp_send_json_error( __( 'Please enter your API secret, click "save changes", and try again.', 'convertkit' ) );
     49            wp_die();
     50        }
     51
     52        $update_resources = $this->api->update_resources( $api_key, $api_secret );
    4653
    4754        $forms = get_option( 'convertkit_forms', array() );
  • convertkit/trunk/includes/class-convertkit.php

    r2213878 r2215780  
    686686            // Refresh the forms meta to get new forms builder settings
    687687            $api_key = self::_get_settings( 'api_key' );
    688             if ( ! empty( $api_key ) ) {
    689                 self::$api->update_resources( $api_key );
     688            $api_secret = self::_get_settings( 'api_secret' );
     689
     690            if ( ! empty( $api_key ) && ! empty( $api_secret ) ) {
     691                self::$api->update_resources( $api_key, $api_secret );
    690692            }
    691693            update_option( 'convertkit_version', CONVERTKIT_PLUGIN_VERSION );
  • convertkit/trunk/readme.txt

    r2213878 r2215780  
    55Requires at least: 3.6
    66Tested up to: 5.3.1
    7 Stable tag: 1.9.0
     7Stable tag: 1.9.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4646
    4747== Changelog ==
     48### 1.9.1 2019-12-20
     49* Fix bug that prevented "refresh forms" button on settings page from working
     50
    4851### 1.9.0 2019-12-17
    4952* Allow appending forms to WooCommerce products
  • convertkit/trunk/vendor/autoload.php

    r2213878 r2215780  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit29fedc03c074d1205488d365aa02d8ed::getLoader();
     7return ComposerAutoloaderInit07d524f77a7893d89b3f4b37f7b7d90f::getLoader();
  • convertkit/trunk/vendor/composer/autoload_real.php

    r2213878 r2215780  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit29fedc03c074d1205488d365aa02d8ed
     5class ComposerAutoloaderInit07d524f77a7893d89b3f4b37f7b7d90f
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit29fedc03c074d1205488d365aa02d8ed', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit07d524f77a7893d89b3f4b37f7b7d90f', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit29fedc03c074d1205488d365aa02d8ed', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit07d524f77a7893d89b3f4b37f7b7d90f', 'loadClassLoader'));
    2525
    2626        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    2828            require_once __DIR__ . '/autoload_static.php';
    2929
    30             call_user_func(\Composer\Autoload\ComposerStaticInit29fedc03c074d1205488d365aa02d8ed::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit07d524f77a7893d89b3f4b37f7b7d90f::getInitializer($loader));
    3131        } else {
    3232            $map = require __DIR__ . '/autoload_namespaces.php';
  • convertkit/trunk/vendor/composer/autoload_static.php

    r2213878 r2215780  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit29fedc03c074d1205488d365aa02d8ed
     7class ComposerStaticInit07d524f77a7893d89b3f4b37f7b7d90f
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3939    {
    4040        return \Closure::bind(function () use ($loader) {
    41             $loader->prefixLengthsPsr4 = ComposerStaticInit29fedc03c074d1205488d365aa02d8ed::$prefixLengthsPsr4;
    42             $loader->prefixDirsPsr4 = ComposerStaticInit29fedc03c074d1205488d365aa02d8ed::$prefixDirsPsr4;
    43             $loader->prefixesPsr0 = ComposerStaticInit29fedc03c074d1205488d365aa02d8ed::$prefixesPsr0;
     41            $loader->prefixLengthsPsr4 = ComposerStaticInit07d524f77a7893d89b3f4b37f7b7d90f::$prefixLengthsPsr4;
     42            $loader->prefixDirsPsr4 = ComposerStaticInit07d524f77a7893d89b3f4b37f7b7d90f::$prefixDirsPsr4;
     43            $loader->prefixesPsr0 = ComposerStaticInit07d524f77a7893d89b3f4b37f7b7d90f::$prefixesPsr0;
    4444
    4545        }, null, ClassLoader::class);
  • convertkit/trunk/wp-convertkit.php

    r2213878 r2215780  
    44 * Plugin URI: https://convertkit.com/
    55 * Description: Quickly and easily integrate ConvertKit forms into your site.
    6  * Version: 1.9.0
     6 * Version: 1.9.1
    77 * Author: ConvertKit
    88 * Author URI: https://convertkit.com/
     
    1717define( 'CONVERTKIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    1818define( 'CONVERTKIT_PLUGIN_PATH', __DIR__ );
    19 define( 'CONVERTKIT_PLUGIN_VERSION', '1.9.0' );
     19define( 'CONVERTKIT_PLUGIN_VERSION', '1.9.1' );
    2020
    2121require_once CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php';
Note: See TracChangeset for help on using the changeset viewer.