initial docker setup
This commit is contained in:
7
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/autoload.php
vendored
Normal file
7
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/autoload.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit03353625f04afb51760eeb064c3f6a02::getLoader();
|
||||
445
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/ClassLoader.php
vendored
Normal file
445
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/ClassLoader.php
vendored
Normal file
@@ -0,0 +1,445 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
* // register classes with namespaces
|
||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
||||
* $loader->add('Symfony', __DIR__.'/framework');
|
||||
*
|
||||
* // activate the autoloader
|
||||
* $loader->register();
|
||||
*
|
||||
* // to enable searching the include path (eg. for PEAR packages)
|
||||
* $loader->setUseIncludePath(true);
|
||||
*
|
||||
* In this example, if you try to use a class in the Symfony\Component
|
||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
||||
* the autoloader will first look for the class under the component/
|
||||
* directory, and it will then fallback to the framework/ directory if not
|
||||
* found before giving up.
|
||||
*
|
||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
// PSR-4
|
||||
private $prefixLengthsPsr4 = array();
|
||||
private $prefixDirsPsr4 = array();
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
private $prefixesPsr0 = array();
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
private $classMapAuthoritative = false;
|
||||
private $missingClasses = array();
|
||||
private $apcuPrefix;
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $classMap Class to filename map
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
if ($this->classMap) {
|
||||
$this->classMap = array_merge($this->classMap, $classMap);
|
||||
} else {
|
||||
$this->classMap = $classMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
// Register directories for a new namespace.
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 base directories
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr0 = (array) $paths;
|
||||
} else {
|
||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr4 = (array) $paths;
|
||||
} else {
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
$this->useIncludePath = $useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to check if the autoloader uses the include path to check
|
||||
* for classes.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseIncludePath()
|
||||
{
|
||||
return $this->useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off searching the prefix and fallback directories for classes
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should class lookup fail if not found in the current class map?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isClassMapAuthoritative()
|
||||
{
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getApcuPrefix()
|
||||
{
|
||||
return $this->apcuPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return bool|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the file where the class is defined.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
*
|
||||
* @return string|false The path if found, false otherwise
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
if (null !== $this->apcuPrefix) {
|
||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
||||
if ($hit) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if (null !== $this->apcuPrefix) {
|
||||
apcu_add($this->apcuPrefix.$class, $file);
|
||||
}
|
||||
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
if (file_exists($file = $dir . $pathEnd)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 lookup
|
||||
if (false !== $pos = strrpos($class, '\\')) {
|
||||
// namespaced class name
|
||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
// PEAR-like class name
|
||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
||||
}
|
||||
|
||||
if (isset($this->prefixesPsr0[$first])) {
|
||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 include paths.
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*/
|
||||
function includeFile($file)
|
||||
{
|
||||
include $file;
|
||||
}
|
||||
21
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/LICENSE
vendored
Normal file
21
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
10
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_files.php
vendored
Normal file
10
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_files.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'cad43f73916476d83565191d54c1f14b' => $vendorDir . '/krokedil/krokedil-logger/src/krokedil-order-event-log.php',
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
9
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_psr4.php
vendored
Normal file
9
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_psr4.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
70
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_real.php
vendored
Normal file
70
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_real.php
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit03353625f04afb51760eeb064c3f6a02
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
public static function loadClassLoader($class)
|
||||
{
|
||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
||||
require __DIR__ . '/ClassLoader.php';
|
||||
}
|
||||
}
|
||||
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit03353625f04afb51760eeb064c3f6a02', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit03353625f04afb51760eeb064c3f6a02', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit03353625f04afb51760eeb064c3f6a02::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit03353625f04afb51760eeb064c3f6a02::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire03353625f04afb51760eeb064c3f6a02($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire03353625f04afb51760eeb064c3f6a02($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
}
|
||||
}
|
||||
19
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_static.php
vendored
Normal file
19
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/autoload_static.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit03353625f04afb51760eeb064c3f6a02
|
||||
{
|
||||
public static $files = array (
|
||||
'cad43f73916476d83565191d54c1f14b' => __DIR__ . '/..' . '/krokedil/krokedil-logger/src/krokedil-order-event-log.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
48
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/installed.json
vendored
Normal file
48
backend/wp-content/plugins/klarna-checkout-for-woocommerce/vendor/composer/installed.json
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
[
|
||||
{
|
||||
"name": "krokedil/krokedil-logger",
|
||||
"version": "1.0.6",
|
||||
"version_normalized": "1.0.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/krokedil/krokedil-logger.git",
|
||||
"reference": "68fca237f3d53720d223373827531488d5ef7b21"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/krokedil/krokedil-logger/zipball/68fca237f3d53720d223373827531488d5ef7b21",
|
||||
"reference": "68fca237f3d53720d223373827531488d5ef7b21",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"time": "2018-03-29T13:59:58+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/krokedil-order-event-log.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Krokedil",
|
||||
"email": "info@krokedil.se",
|
||||
"homepage": "https://www.krokedil.se",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Logging for WooCommerce Gateways",
|
||||
"homepage": "https://www.krokedil.se",
|
||||
"keywords": [
|
||||
"log",
|
||||
"logging",
|
||||
"woocommerce"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,52 @@
|
||||
# krokedil-logger
|
||||
## Installation
|
||||
Install with [Composer](getcomposer.org).
|
||||
|
||||
Add these lines to your composer.json:
|
||||
```
|
||||
{
|
||||
"require": {
|
||||
"krokedil/krokedil-logger": "^1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
### Log event
|
||||
Use the function **krokedil_log_events**.
|
||||
```
|
||||
Example: krokedil_log_events( $order_id, $title, $data );
|
||||
```
|
||||
$order_id = The WooCommerce order id. Can be sent as null if you want to log events before an order exists.
|
||||
|
||||
$title = The title that you wish to have for the event.
|
||||
|
||||
$data = An **array** of the data that you want to log.
|
||||
|
||||
### Set the version used for order
|
||||
|
||||
Use the function **krokedil_set_order_gateway_version**.
|
||||
```
|
||||
Example: krokedil_set_order_gateway_version( $order_id, $version );
|
||||
```
|
||||
$order_id = The WooCommerce order id.
|
||||
|
||||
$version = The version that you want to log for the order.
|
||||
|
||||
Use this function at a point where an order exists, for example thank you page or process_order.
|
||||
|
||||
### Set display on/off
|
||||
To switch between showing and not showing the logs on the order add a define for **KROKEDIL_LOGGER_ON** to turn it on.
|
||||
```
|
||||
Example: define( 'KROKEDIL_LOGGER_ON', true );
|
||||
```
|
||||
|
||||
### Set gateway filter
|
||||
You need to set what gateway the meta box should be allowed for. Do this using the define **KROKEDIL_LOGGER_GATEWAY**.
|
||||
```
|
||||
Example: define( 'KROKEDIL_LOGGER_GATEWAY', '$string' );
|
||||
```
|
||||
$string = A string or substring of the gateway id.
|
||||
|
||||
### Recognition
|
||||
This plugin uses the renderjson JavaScript created by GitHub user [Caldwell](https://github.com/caldwell/). It can be found here: [RenderJSON](https://github.com/caldwell/renderjson).
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "krokedil/krokedil-logger",
|
||||
"type": "library",
|
||||
"description": "Logging for WooCommerce Gateways",
|
||||
"keywords": ["log","logging", "woocommerce"],
|
||||
"homepage": "https://www.krokedil.se",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Krokedil",
|
||||
"email": "info@krokedil.se",
|
||||
"homepage": "https://www.krokedil.se",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"autoload": {
|
||||
"files": ["src/krokedil-order-event-log.php"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
.krokedil_event {
|
||||
margin:5px;
|
||||
background-color:#f9f9f9;
|
||||
overflow-x:auto;
|
||||
}
|
||||
.krokedil_event_header * {
|
||||
display:inline-block;
|
||||
margin:5px;
|
||||
}
|
||||
.krokedil_event_header {
|
||||
padding:5px;
|
||||
background-color:#f1f1f1;
|
||||
}
|
||||
.krokedil_event_header h5 {
|
||||
float:right;
|
||||
}
|
||||
.krokedil_hidden {
|
||||
display:none;
|
||||
}
|
||||
.krokedil_shown{
|
||||
clear:both;
|
||||
display:block;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
jQuery( function( $ ) {
|
||||
var krokedil_event_log = {
|
||||
renderJson: function() {
|
||||
$(".krokedil_json").each(function(){
|
||||
var string = $( this ).html();
|
||||
var json = JSON.parse( string );
|
||||
renderjson;
|
||||
$( this ).html( renderjson.set_show_to_level( '2' )( json ) )
|
||||
});
|
||||
},
|
||||
toggleJson: function( event_nr ){
|
||||
console.log( 'in function');
|
||||
var event_id = '#krokedil_event_nr_' + event_nr;
|
||||
console.log( event_id );
|
||||
if( $( event_id ).hasClass( 'krokedil_hidden' ) ) {
|
||||
$( event_id ).removeClass( 'krokedil_hidden' );
|
||||
$( event_id ).addClass( 'krokedil_shown' );
|
||||
} else {
|
||||
$( event_id ).removeClass( 'krokedil_shown' );
|
||||
$( event_id ).addClass( 'krokedil_hidden' );
|
||||
}
|
||||
}
|
||||
}
|
||||
$( document ).ready(function() {
|
||||
krokedil_event_log.renderJson();
|
||||
});
|
||||
$('body').on('click', '.krokedil_timestamp', function() {
|
||||
console.log( 'click' );
|
||||
var event_nr = $(this).data('event-nr');
|
||||
console.log(event_nr)
|
||||
console.log($(this));
|
||||
krokedil_event_log.toggleJson( event_nr );
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,208 @@
|
||||
// Copyright © 2013-2017 David Caldwell <david@porkrind.org>
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
// Usage
|
||||
// -----
|
||||
// The module exports one entry point, the `renderjson()` function. It takes in
|
||||
// the JSON you want to render as a single argument and returns an HTML
|
||||
// element.
|
||||
//
|
||||
// Options
|
||||
// -------
|
||||
// renderjson.set_icons("+", "-")
|
||||
// This Allows you to override the disclosure icons.
|
||||
//
|
||||
// renderjson.set_show_to_level(level)
|
||||
// Pass the number of levels to expand when rendering. The default is 0, which
|
||||
// starts with everything collapsed. As a special case, if level is the string
|
||||
// "all" then it will start with everything expanded.
|
||||
//
|
||||
// renderjson.set_max_string_length(length)
|
||||
// Strings will be truncated and made expandable if they are longer than
|
||||
// `length`. As a special case, if `length` is the string "none" then
|
||||
// there will be no truncation. The default is "none".
|
||||
//
|
||||
// renderjson.set_sort_objects(sort_bool)
|
||||
// Sort objects by key (default: false)
|
||||
//
|
||||
// renderjson.set_replacer(replacer_function)
|
||||
// Equivalent of JSON.stringify() `replacer` argument when it's a function
|
||||
//
|
||||
// renderjson.set_property_list(property_list)
|
||||
// Equivalent of JSON.stringify() `replacer` argument when it's an array
|
||||
//
|
||||
// Theming
|
||||
// -------
|
||||
// The HTML output uses a number of classes so that you can theme it the way
|
||||
// you'd like:
|
||||
// .disclosure ("⊕", "⊖")
|
||||
// .syntax (",", ":", "{", "}", "[", "]")
|
||||
// .string (includes quotes)
|
||||
// .number
|
||||
// .boolean
|
||||
// .key (object key)
|
||||
// .keyword ("null", "undefined")
|
||||
// .object.syntax ("{", "}")
|
||||
// .array.syntax ("[", "]")
|
||||
|
||||
var module, window, define, renderjson=(function() {
|
||||
var themetext = function(/* [class, text]+ */) {
|
||||
var spans = [];
|
||||
while (arguments.length)
|
||||
spans.push(append(span(Array.prototype.shift.call(arguments)),
|
||||
text(Array.prototype.shift.call(arguments))));
|
||||
return spans;
|
||||
};
|
||||
var append = function(/* el, ... */) {
|
||||
var el = Array.prototype.shift.call(arguments);
|
||||
for (var a=0; a<arguments.length; a++)
|
||||
if (arguments[a].constructor == Array)
|
||||
append.apply(this, [el].concat(arguments[a]));
|
||||
else
|
||||
el.appendChild(arguments[a]);
|
||||
return el;
|
||||
};
|
||||
var prepend = function(el, child) {
|
||||
el.insertBefore(child, el.firstChild);
|
||||
return el;
|
||||
}
|
||||
var isempty = function(obj, pl) { var keys = pl || Object.keys(obj);
|
||||
for (var i in keys) if (Object.hasOwnProperty.call(obj, keys[i])) return false;
|
||||
return true; }
|
||||
var text = function(txt) { return document.createTextNode(txt) };
|
||||
var div = function() { return document.createElement("div") };
|
||||
var span = function(classname) { var s = document.createElement("span");
|
||||
if (classname) s.className = classname;
|
||||
return s; };
|
||||
var A = function A(txt, classname, callback) { var a = document.createElement("a");
|
||||
if (classname) a.className = classname;
|
||||
a.appendChild(text(txt));
|
||||
a.href = '#';
|
||||
a.onclick = function(e) { callback(); if (e) e.stopPropagation(); return false; };
|
||||
return a; };
|
||||
|
||||
function _renderjson(json, indent, dont_indent, show_level, options) {
|
||||
var my_indent = dont_indent ? "" : indent;
|
||||
|
||||
var disclosure = function(open, placeholder, close, type, builder) {
|
||||
var content;
|
||||
var empty = span(type);
|
||||
var show = function() { if (!content) append(empty.parentNode,
|
||||
content = prepend(builder(),
|
||||
A(options.hide, "disclosure",
|
||||
function() { content.style.display="none";
|
||||
empty.style.display="inline"; } )));
|
||||
content.style.display="inline";
|
||||
empty.style.display="none"; };
|
||||
append(empty,
|
||||
A(options.show, "disclosure", show),
|
||||
themetext(type+ " syntax", open),
|
||||
A(placeholder, null, show),
|
||||
themetext(type+ " syntax", close));
|
||||
|
||||
var el = append(span(), text(my_indent.slice(0,-1)), empty);
|
||||
if (show_level > 0 && type != "string")
|
||||
show();
|
||||
return el;
|
||||
};
|
||||
|
||||
if (json === null) return themetext(null, my_indent, "keyword", "null");
|
||||
if (json === void 0) return themetext(null, my_indent, "keyword", "undefined");
|
||||
|
||||
if (typeof(json) == "string" && json.length > options.max_string_length)
|
||||
return disclosure('"', json.substr(0,options.max_string_length)+" ...", '"', "string", function () {
|
||||
return append(span("string"), themetext(null, my_indent, "string", JSON.stringify(json)));
|
||||
});
|
||||
|
||||
if (typeof(json) != "object" || [Number, String, Boolean, Date].indexOf(json.constructor) >= 0) // Strings, numbers and bools
|
||||
return themetext(null, my_indent, typeof(json), JSON.stringify(json));
|
||||
|
||||
if (json.constructor == Array) {
|
||||
if (json.length == 0) return themetext(null, my_indent, "array syntax", "[]");
|
||||
|
||||
return disclosure("[", " ... ", "]", "array", function () {
|
||||
var as = append(span("array"), themetext("array syntax", "[", null, "\n"));
|
||||
for (var i=0; i<json.length; i++)
|
||||
append(as,
|
||||
_renderjson(options.replacer.call(json, i, json[i]), indent+" ", false, show_level-1, options),
|
||||
i != json.length-1 ? themetext("syntax", ",") : [],
|
||||
text("\n"));
|
||||
append(as, themetext(null, indent, "array syntax", "]"));
|
||||
return as;
|
||||
});
|
||||
}
|
||||
|
||||
// object
|
||||
if (isempty(json, options.property_list))
|
||||
return themetext(null, my_indent, "object syntax", "{}");
|
||||
|
||||
return disclosure("{", "...", "}", "object", function () {
|
||||
var os = append(span("object"), themetext("object syntax", "{", null, "\n"));
|
||||
for (var k in json) var last = k;
|
||||
var keys = options.property_list || Object.keys(json);
|
||||
if (options.sort_objects)
|
||||
keys = keys.sort();
|
||||
for (var i in keys) {
|
||||
var k = keys[i];
|
||||
if (!(k in json)) continue;
|
||||
append(os, themetext(null, indent+" ", "key", '"'+k+'"', "object syntax", ': '),
|
||||
_renderjson(options.replacer.call(json, k, json[k]), indent+" ", true, show_level-1, options),
|
||||
k != last ? themetext("syntax", ",") : [],
|
||||
text("\n"));
|
||||
}
|
||||
append(os, themetext(null, indent, "object syntax", "}"));
|
||||
return os;
|
||||
});
|
||||
}
|
||||
|
||||
var renderjson = function renderjson(json)
|
||||
{
|
||||
var options = Object.assign({}, renderjson.options);
|
||||
options.replacer = typeof(options.replacer) == "function" ? options.replacer : function(k,v) { return v; };
|
||||
var pre = append(document.createElement("pre"), _renderjson(json, "", false, options.show_to_level, options));
|
||||
pre.className = "renderjson";
|
||||
return pre;
|
||||
}
|
||||
renderjson.set_icons = function(show, hide) { renderjson.options.show = show;
|
||||
renderjson.options.hide = hide;
|
||||
return renderjson; };
|
||||
renderjson.set_show_to_level = function(level) { renderjson.options.show_to_level = typeof level == "string" &&
|
||||
level.toLowerCase() === "all" ? Number.MAX_VALUE
|
||||
: level;
|
||||
return renderjson; };
|
||||
renderjson.set_max_string_length = function(length) { renderjson.options.max_string_length = typeof length == "string" &&
|
||||
length.toLowerCase() === "none" ? Number.MAX_VALUE
|
||||
: length;
|
||||
return renderjson; };
|
||||
renderjson.set_sort_objects = function(sort_bool) { renderjson.options.sort_objects = sort_bool;
|
||||
return renderjson; };
|
||||
renderjson.set_replacer = function(replacer) { renderjson.options.replacer = replacer;
|
||||
return renderjson; };
|
||||
renderjson.set_property_list = function(prop_list) { renderjson.options.property_list = prop_list;
|
||||
return renderjson; };
|
||||
// Backwards compatiblity. Use set_show_to_level() for new code.
|
||||
renderjson.set_show_by_default = function(show) { renderjson.options.show_to_level = show ? Number.MAX_VALUE : 0;
|
||||
return renderjson; };
|
||||
renderjson.options = {};
|
||||
renderjson.set_icons('⊕', '⊖');
|
||||
renderjson.set_show_by_default(false);
|
||||
renderjson.set_sort_objects(false);
|
||||
renderjson.set_max_string_length("none");
|
||||
renderjson.set_replacer(void 0);
|
||||
renderjson.set_property_list(void 0);
|
||||
return renderjson;
|
||||
})();
|
||||
|
||||
if (define) define({renderjson:renderjson})
|
||||
else (module||{}).exports = (window||{}).renderjson = renderjson;
|
||||
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
if( ! function_exists( 'krokedil_log_events' ) ) {
|
||||
define( 'KROKEDIL_LOGGER_VERSION', '1.0.4' );
|
||||
|
||||
add_action( 'admin_enqueue_scripts', 'krokedi_load_admin_scripts' );
|
||||
if ( defined( 'KROKEDIL_LOGGER_ON' ) ) {
|
||||
add_action( 'add_meta_boxes', 'krokedil_meta_box' );
|
||||
}
|
||||
add_action( 'woocommerce_new_order', 'krokedil_add_sessions_to_events', 10, 1 );
|
||||
|
||||
function krokedi_load_admin_scripts() {
|
||||
wp_register_script(
|
||||
'krokedil_event_log',
|
||||
plugins_url( 'assets/js/krokedil-event-log.js', __FILE__ ),
|
||||
array( 'jquery' ),
|
||||
KROKEDIL_LOGGER_VERSION
|
||||
);
|
||||
|
||||
$params = array(
|
||||
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
||||
);
|
||||
|
||||
wp_localize_script( 'krokedil_event_log', 'krokedil_event_log_params', $params );
|
||||
|
||||
wp_enqueue_script( 'krokedil_event_log' );
|
||||
|
||||
wp_register_script(
|
||||
'render_json',
|
||||
plugins_url( 'assets/js/renderjson.js', __FILE__ ),
|
||||
array( 'jquery' ),
|
||||
KROKEDIL_LOGGER_VERSION
|
||||
);
|
||||
|
||||
$params = array();
|
||||
|
||||
wp_localize_script( 'render_json', 'render_json_params', $params );
|
||||
|
||||
wp_enqueue_script( 'render_json' );
|
||||
|
||||
wp_register_style(
|
||||
'krokedil_events_style',
|
||||
plugin_dir_url( __FILE__ ) . 'assets/css/krokedil-event-log.css',
|
||||
array(),
|
||||
KROKEDIL_LOGGER_VERSION
|
||||
);
|
||||
wp_enqueue_style( 'krokedil_events_style' );
|
||||
}
|
||||
|
||||
function krokedil_log_events( $order_id, $title, $data ) {
|
||||
if ( WC()->session ) {
|
||||
if ( null === $order_id ) {
|
||||
if ( WC()->session->get( '_krokedil_events_session' ) ) {
|
||||
$events = WC()->session->get( '_krokedil_events_session' );
|
||||
} else {
|
||||
$events = array();
|
||||
}
|
||||
$event = array(
|
||||
'title' => $title,
|
||||
'data' => $data,
|
||||
'timestamp' => current_time( 'Y-m-d H:i:s' )
|
||||
);
|
||||
$events[] = $event;
|
||||
WC()->session->set( '_krokedil_events_session', $events );
|
||||
} else {
|
||||
if ( get_post_meta( $order_id, '_krokedil_order_events' ) ) {
|
||||
$events = get_post_meta( $order_id, '_krokedil_order_events', true );
|
||||
} else {
|
||||
$events = array();
|
||||
}
|
||||
|
||||
$event = array(
|
||||
'title' => $title,
|
||||
'data' => $data,
|
||||
'timestamp' => current_time( 'Y-m-d H:i:s' )
|
||||
);
|
||||
|
||||
$events[] = $event;
|
||||
update_post_meta( $order_id, '_krokedil_order_events', $events );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function krokedil_log_response( $order_id, $response ) {
|
||||
if ( WC()->session ) {
|
||||
if ( null === $order_id ) {
|
||||
$events = WC()->session->get( '_krokedil_events_session' );
|
||||
end( $events );
|
||||
$event = key( $events );
|
||||
$events[ $event ]['response'] = $response;
|
||||
WC()->session->set( '_krokedil_events_session', $events );
|
||||
} else {
|
||||
$events = get_post_meta( $order_id, '_krokedil_order_events', true );
|
||||
end( $events );
|
||||
$event = key( $events );
|
||||
$events[ $event ]['response'] = $response;
|
||||
update_post_meta( $order_id, '_krokedil_order_events', $events );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function krokedil_add_sessions_to_events( $order_id ) {
|
||||
if ( WC()->session ) {
|
||||
if ( WC()->session->get( '_krokedil_events_session' ) ) {
|
||||
$session_events = WC()->session->get( '_krokedil_events_session' );
|
||||
update_post_meta( $order_id, '_krokedil_order_events', $session_events );
|
||||
WC()->session->__unset( '_krokedil_events_session' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function krokedil_get_events() {
|
||||
return get_post_meta( get_the_ID(), '_krokedil_order_events', true );
|
||||
}
|
||||
|
||||
function krokedil_meta_box( $post_type ) {
|
||||
if ( 'shop_order' === $post_type ) {
|
||||
$order_id = get_the_ID();
|
||||
$order = wc_get_order( $order_id );
|
||||
if ( false !== strpos( $order->get_payment_method(), KROKEDIL_LOGGER_GATEWAY ) ) {
|
||||
if ( get_post_meta( $order_id, '_krokedil_order_events' ) ) {
|
||||
add_meta_box( 'krokedil_order_events', __( 'Events', 'krokedil-for-woocommerce' ), 'krokedil_meta_contents', 'shop_order', 'normal', 'core' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function krokedil_set_order_gateway_version( $order_id, $version ) {
|
||||
update_post_meta( $order_id, '_krokedil_order_gateway_version', $version );
|
||||
}
|
||||
|
||||
function krokedil_get_order_version() {
|
||||
$order_id = get_the_ID();
|
||||
|
||||
return get_post_meta( $order_id, '_krokedil_order_gateway_version', true );
|
||||
}
|
||||
|
||||
function krokedil_meta_contents() {
|
||||
$events = krokedil_get_events();
|
||||
$i = 0;
|
||||
foreach ( $events as $event ) {
|
||||
$i += 1;
|
||||
echo '<div class="krokedil_event">';
|
||||
echo '<div class="krokedil_event_header">';
|
||||
echo '<h4>' . $event['title'] . '</h4>';
|
||||
echo '<h5 class="krokedil_timestamp" data-event-nr="' . $i . '"><a href="#krokedil_event_nr_' . $i . '">Time: ' . $event['timestamp'] . '</a></h5>';
|
||||
echo '</div>';
|
||||
echo '<div class="krokedil_json krokedil_hidden" id="krokedil_event_nr_' . $i . '">' . json_encode( $event['data'] ) . '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '<small>Version of plugin used for order: ' . krokedil_get_order_version() . '</small>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user