Changeset 2206525
- Timestamp:
- 12/05/2019 11:57:22 AM (5 years ago)
- 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 50 50 static $profile = null; 51 51 52 if ( null === $profile) {52 if () { 53 53 $isTestMode = isTestModeEnabled(); 54 54 … … 68 68 function merchantProfileId() 69 69 { 70 $merchantProfile = merchantProfile(); 70 static $merchantProfileId = null; 71 $merchantProfileIdOptionKey = Mollie_WC_Plugin::PLUGIN_ID . '_merchant_profile_id'; 71 72 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; 73 95 } 74 96 -
mollie-payments-for-woocommerce/trunk/mollie-payments-for-woocommerce.php
r2205807 r2206525 4 4 * Plugin URI: https://www.mollie.com 5 5 * Description: Accept payments in WooCommerce with the official Mollie plugin 6 * Version: 5.4. 06 * Version: 5.4. 7 7 * Author: Mollie 8 8 * Author URI: https://www.mollie.com -
mollie-payments-for-woocommerce/trunk/readme.txt
r2205807 r2206525 4 4 Requires at least: 3.8 5 5 Tested up to: 5.3 6 Stable tag: 5.4. 06 Stable tag: 5.4. 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 182 182 == Changelog == 183 183 184 185 186 187 184 188 = 5.4.0 - 04-12-2019 = 185 189 -
mollie-payments-for-woocommerce/trunk/src/Mollie/WC/Helper/Settings.php
r2205807 r2206525 1 1 <?php 2 3 4 2 5 class Mollie_WC_Helper_Settings 3 6 { … … 52 55 $setting_id = $test_mode ? 'test_api_key' : 'live_api_key'; 53 56 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); 55 65 } 56 66 … … 134 144 * @return string 135 145 */ 136 public function getLogsUrl 146 public function getLogsUrl() 137 147 { 138 148 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 139 175 } 140 176 … … 147 183 * @return string 148 184 */ 149 protected function getPluginStatus 185 protected function getPluginStatus() 150 186 { 151 187 $status = Mollie_WC_Plugin::getStatusHelper(); 152 188 153 if (!$status->isCompatible()) 154 { 189 if (!$status->isCompatible()) { 155 190 // Just stop here! 156 191 return '' 157 192 . '<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()) 159 197 . '</p></div>'; 160 198 } -
mollie-payments-for-woocommerce/trunk/src/Mollie/WC/Plugin.php
r2205807 r2206525 9 9 const PLUGIN_ID = 'mollie-payments-for-woocommerce'; 10 10 const PLUGIN_TITLE = 'Mollie Payments for WooCommerce'; 11 const PLUGIN_VERSION = '5.4. 0';11 const PLUGIN_VERSION = '5.4.'; 12 12 13 13 const DB_VERSION = '1.0'; … … 205 205 } 206 206 } 207 208 209 210 211 212 207 213 ); 208 214 -
mollie-payments-for-woocommerce/trunk/vendor/autoload.php
r2205807 r2206525 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 3ea1880a2740a3571db7cff67650474a::getLoader();7 return ComposerAutoloaderInit::getLoader(); -
mollie-payments-for-woocommerce/trunk/vendor/composer/autoload_real.php
r2205807 r2206525 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 3ea1880a2740a3571db7cff67650474a5 class ComposerAutoloaderInit 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 3ea1880a2740a3571db7cff67650474a', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 3ea1880a2740a3571db7cff67650474a', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit 3ea1880a2740a3571db7cff67650474a::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit 3ea1880a2740a3571db7cff67650474a::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInit::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire 3ea1880a2740a3571db7cff67650474a($fileIdentifier, $file);56 composerRequire($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire 3ea1880a2740a3571db7cff67650474a($fileIdentifier, $file)63 function composerRequire($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
mollie-payments-for-woocommerce/trunk/vendor/composer/autoload_static.php
r2205807 r2206525 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 3ea1880a2740a3571db7cff67650474a7 class ComposerStaticInit 8 8 { 9 9 public static $files = array ( … … 287 287 { 288 288 return \Closure::bind(function () use ($loader) { 289 $loader->prefixLengthsPsr4 = ComposerStaticInit 3ea1880a2740a3571db7cff67650474a::$prefixLengthsPsr4;290 $loader->prefixDirsPsr4 = ComposerStaticInit 3ea1880a2740a3571db7cff67650474a::$prefixDirsPsr4;291 $loader->prefixesPsr0 = ComposerStaticInit 3ea1880a2740a3571db7cff67650474a::$prefixesPsr0;292 $loader->classMap = ComposerStaticInit 3ea1880a2740a3571db7cff67650474a::$classMap;289 $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4; 290 $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4; 291 $loader->prefixesPsr0 = ComposerStaticInit::$prefixesPsr0; 292 $loader->classMap = ComposerStaticInit::$classMap; 293 293 294 294 }, null, ClassLoader::class);
Note: See TracChangeset
for help on using the changeset viewer.