Plugin Directory

Changeset 2206525

Timestamp:
12/05/2019 11:57:22 AM (5 years ago)
Author:
wido
Message:

bump 5.4.1

Location:
mollie-payments-for-woocommerce/trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • mollie-payments-for-woocommerce/trunk/inc/utils.php

    r2205807 r2206525  
    5050    static $profile = null;
    5151
    52     if (null === $profile) {
     52    if () {
    5353        $isTestMode = isTestModeEnabled();
    5454
     
    6868function merchantProfileId()
    6969{
    70     $merchantProfile = merchantProfile();
     70    static $merchantProfileId = null;
     71    $merchantProfileIdOptionKey = Mollie_WC_Plugin::PLUGIN_ID . '_merchant_profile_id';
    7172
    72     return isset($merchantProfile->id) ? $merchantProfile->id : 0;
     73    if ($merchantProfileId === null) {
     74        $merchantProfileId = get_option($merchantProfileIdOptionKey, '');
     75
     76        /*
     77         * Try to retrieve the merchant profile ID from an Api Request if not stored already,
     78         * then store it into the database
     79         */
     80        if (!$merchantProfileId) {
     81            try {
     82                $merchantProfile = merchantProfile();
     83                $merchantProfileId = isset($merchantProfile->id) ? $merchantProfile->id : '';
     84            } catch (ApiException $exception) {
     85                $merchantProfileId = '';
     86            }
     87
     88            if ($merchantProfileId) {
     89                update_option($merchantProfileIdOptionKey, $merchantProfileId, false);
     90            }
     91        }
     92    }
     93
     94    return $merchantProfileId;
    7395}
    7496
  • mollie-payments-for-woocommerce/trunk/mollie-payments-for-woocommerce.php

    r2205807 r2206525  
    44 * Plugin URI: https://www.mollie.com
    55 * Description: Accept payments in WooCommerce with the official Mollie plugin
    6  * Version: 5.4.0
     6 * Version: 5.4.
    77 * Author: Mollie
    88 * Author URI: https://www.mollie.com
  • mollie-payments-for-woocommerce/trunk/readme.txt

    r2205807 r2206525  
    44Requires at least: 3.8
    55Tested up to: 5.3
    6 Stable tag: 5.4.0
     6Stable tag: 5.4.
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    182182== Changelog ==
    183183
     184
     185
     186
     187
    184188= 5.4.0 - 04-12-2019 =
    185189
  • mollie-payments-for-woocommerce/trunk/src/Mollie/WC/Helper/Settings.php

    r2205807 r2206525  
    11<?php
     2
     3
     4
    25class Mollie_WC_Helper_Settings
    36{
     
    5255        $setting_id = $test_mode ? 'test_api_key' : 'live_api_key';
    5356
    54         return trim(get_option($this->getSettingId($setting_id)));
     57        $apiKeyId = $this->getSettingId($setting_id);
     58        $apiKey = get_option($apiKeyId);
     59
     60        if (!$apiKey && is_admin()) {
     61            $apiKey = filter_input(INPUT_POST, $apiKeyId, FILTER_SANITIZE_STRING);
     62        }
     63
     64        return trim($apiKey);
    5565    }
    5666
     
    134144     * @return string
    135145     */
    136     public function getLogsUrl ()
     146    public function getLogsUrl()
    137147    {
    138148        return admin_url('admin.php?page=wc-status&tab=logs');
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
    139175    }
    140176
     
    147183     * @return string
    148184     */
    149     protected function getPluginStatus ()
     185    protected function getPluginStatus()
    150186    {
    151187        $status = Mollie_WC_Plugin::getStatusHelper();
    152188
    153         if (!$status->isCompatible())
    154         {
     189        if (!$status->isCompatible()) {
    155190            // Just stop here!
    156191            return ''
    157192                . '<div class="notice notice-error">'
    158                 . '<p><strong>' . __('Error', 'mollie-payments-for-woocommerce') . ':</strong> ' . implode('<br/>', $status->getErrors())
     193                . '<p><strong>' . __(
     194                    'Error',
     195                    'mollie-payments-for-woocommerce'
     196                ) . ':</strong> ' . implode('<br/>', $status->getErrors())
    159197                . '</p></div>';
    160198        }
  • mollie-payments-for-woocommerce/trunk/src/Mollie/WC/Plugin.php

    r2205807 r2206525  
    99    const PLUGIN_ID      = 'mollie-payments-for-woocommerce';
    1010    const PLUGIN_TITLE   = 'Mollie Payments for WooCommerce';
    11     const PLUGIN_VERSION = '5.4.0';
     11    const PLUGIN_VERSION = '5.4.';
    1212
    1313    const DB_VERSION     = '1.0';
     
    205205                }
    206206            }
     207
     208
     209
     210
     211
     212
    207213        );
    208214
  • mollie-payments-for-woocommerce/trunk/vendor/autoload.php

    r2205807 r2206525  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a::getLoader();
     7return ComposerAutoloaderInit::getLoader();
  • mollie-payments-for-woocommerce/trunk/vendor/composer/autoload_real.php

    r2205807 r2206525  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a
     5class ComposerAutoloaderInit
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit', '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\ComposerStaticInit3ea1880a2740a3571db7cff67650474a::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader));
    3131        } else {
    3232            $map = require __DIR__ . '/autoload_namespaces.php';
     
    4949
    5050        if ($useStaticLoader) {
    51             $includeFiles = Composer\Autoload\ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$files;
     51            $includeFiles = Composer\Autoload\ComposerStaticInit::$files;
    5252        } else {
    5353            $includeFiles = require __DIR__ . '/autoload_files.php';
    5454        }
    5555        foreach ($includeFiles as $fileIdentifier => $file) {
    56             composerRequire3ea1880a2740a3571db7cff67650474a($fileIdentifier, $file);
     56            composerRequire($fileIdentifier, $file);
    5757        }
    5858
     
    6161}
    6262
    63 function composerRequire3ea1880a2740a3571db7cff67650474a($fileIdentifier, $file)
     63function composerRequire($fileIdentifier, $file)
    6464{
    6565    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • mollie-payments-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r2205807 r2206525  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit3ea1880a2740a3571db7cff67650474a
     7class ComposerStaticInit
    88{
    99    public static $files = array (
     
    287287    {
    288288        return \Closure::bind(function () use ($loader) {
    289             $loader->prefixLengthsPsr4 = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$prefixLengthsPsr4;
    290             $loader->prefixDirsPsr4 = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$prefixDirsPsr4;
    291             $loader->prefixesPsr0 = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$prefixesPsr0;
    292             $loader->classMap = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$classMap;
     289            $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4;
     290            $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4;
     291            $loader->prefixesPsr0 = ComposerStaticInit::$prefixesPsr0;
     292            $loader->classMap = ComposerStaticInit::$classMap;
    293293
    294294        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.