Plugin Directory

Changeset 2890660


Ignore:
Timestamp:
03/30/2023 07:55:46 PM (3 years ago)
Author:
handcraftbyte
Message:

fixes issue with preset download

Location:
gtm-ecommerce-woo/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • gtm-ecommerce-woo/trunk/gtm-ecommerce-woo.php

    r2889523 r2890660  
    44 * Plugin URI:  https://wordpress.org/plugins/gtm-ecommerce-woo
    55 * Description: Push WooCommerce eCommerce (GA4 and UA compatible) information to GTM DataLayer. Use any GTM integration to measure your customers' activities.
    6  * Version:     1.10.7
     6 * Version:     1.10.8
    77 * Author:      Handcraft Byte
    88 * Author URI:  https://handcraftbyte.com/
  • gtm-ecommerce-woo/trunk/lib/Service/SettingsService.php

    r2889523 r2890660  
    111111        header('Content-Disposition: attachment; filename=' . $presetName);
    112112        header('Content-Transfer-Encoding: binary');
    113         wp_send_json(json_decode($body, true));
     113        wp_send_json(json_decode($body));
    114114        wp_die();
    115115    }
  • gtm-ecommerce-woo/trunk/readme.txt

    r2889523 r2890660  
    55Tested up to: 6.1.1
    66Requires PHP: 7.0
    7 Stable tag: 1.10.7
     7Stable tag: 1.10.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    118118== Changelog ==
    119119
     120= 1.10.8 =
     121
     122* fix issue with preset download
     123
    120124= 1.10.7 =
    121125
  • gtm-ecommerce-woo/trunk/vendor/autoload.php

    r2889523 r2890660  
    33// autoload.php @generated by Composer
    44
     5if (PHP_VERSION_ID < 50600) {
     6    if (!headers_sent()) {
     7        header('HTTP/1.1 500 Internal Server Error');
     8    }
     9    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
     10    if (!ini_get('display_errors')) {
     11        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
     12            fwrite(STDERR, $err);
     13        } elseif (!headers_sent()) {
     14            echo $err;
     15        }
     16    }
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
     21}
     22
    523require_once __DIR__ . '/composer/autoload_real.php';
    624
  • gtm-ecommerce-woo/trunk/vendor/composer/ClassLoader.php

    r2889523 r2890660  
    4343class ClassLoader
    4444{
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
    4548    /** @var ?string */
    4649    private $vendorDir;
     
    107110    {
    108111        $this->vendorDir = $vendorDir;
     112        self::initializeIncludeClosure();
    109113    }
    110114
     
    150154    /**
    151155     * @return string[] Array of classname => path
    152      * @psalm-var array<string, string>
     156     * @psalm-return array<string, string>
    153157     */
    154158    public function getClassMap()
     
    426430    {
    427431        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     432            $includeFile = self::$includeFile;
     433            $includeFile($file);
    429434
    430435            return true;
     
    556561        return false;
    557562    }
     563
     564    /**
     565     * @return void
     566     */
     567    private static function initializeIncludeClosure()
     568    {
     569        if (self::$includeFile !== null) {
     570            return;
     571        }
     572
     573        /**
     574         * Scope isolated include.
     575         *
     576         * Prevents access to $this/self from included files.
     577         *
     578         * @param  string $file
     579         * @return void
     580         */
     581        self::$includeFile = \Closure::bind(static function($file) {
     582            include $file;
     583        }, null, null);
     584    }
    558585}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • gtm-ecommerce-woo/trunk/vendor/composer/InstalledVersions.php

    r2889523 r2890660  
    2222 *
    2323 * To require its presence, you can require `composer-runtime-api ^2.0`
     24 *
     25 * @final
    2426 */
    2527class InstalledVersions
    2628{
     29    /**
     30     * @var mixed[]|null
     31     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
     32     */
    2733    private static $installed;
     34
     35    /**
     36     * @var bool|null
     37     */
    2838    private static $canGetVendors;
     39
     40    /**
     41     * @var array[]
     42     * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     43     */
    2944    private static $installedByVendor = array();
    3045
     
    8499        foreach (self::getInstalled() as $installed) {
    85100            if (isset($installed['versions'][$packageName])) {
    86                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    87102            }
    88103        }
     
    105120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    106121    {
    107         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    108123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    109124
     
    229244    /**
    230245     * @return array
    231      * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
     246     * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
    232247     */
    233248    public static function getRootPackage()
     
    243258     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
    244259     * @return array[]
    245      * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
     260     * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
    246261     */
    247262    public static function getRawData()
     
    266281     *
    267282     * @return array[]
    268      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     283     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
    269284     */
    270285    public static function getAllRawData()
     
    289304     * @return void
    290305     *
    291      * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
     306     * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
    292307     */
    293308    public static function reload($data)
     
    299314    /**
    300315     * @return array[]
    301      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     316     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
    302317     */
    303318    private static function getInstalled()
     
    314329                    $installed[] = self::$installedByVendor[$vendorDir];
    315330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    316                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     331                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     332                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    317334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    318335                        self::$installed = $installed[count($installed) - 1];
     
    326343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    327344            if (substr(__DIR__, -8, 1) !== 'C') {
    328                 self::$installed = require __DIR__ . '/installed.php';
     345                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
    329348            } else {
    330349                self::$installed = array();
    331350            }
    332351        }
    333         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    334356
    335357        return $installed;
  • gtm-ecommerce-woo/trunk/vendor/composer/autoload_classmap.php

    r2889523 r2890660  
    33// autoload_classmap.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname(dirname($vendorDir));
    77
  • gtm-ecommerce-woo/trunk/vendor/composer/autoload_namespaces.php

    r2889523 r2890660  
    33// autoload_namespaces.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname(dirname($vendorDir));
    77
  • gtm-ecommerce-woo/trunk/vendor/composer/autoload_psr4.php

    r2889523 r2890660  
    33// autoload_psr4.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname(dirname($vendorDir));
    77
  • gtm-ecommerce-woo/trunk/vendor/composer/autoload_real.php

    r2889523 r2890660  
    2424
    2525        spl_autoload_register(array('ComposerAutoloaderInit87708a949ac41b8ec2a1bcc62d766df7', 'loadClassLoader'), true, true);
    26         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
     26        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    2727        spl_autoload_unregister(array('ComposerAutoloaderInit87708a949ac41b8ec2a1bcc62d766df7', 'loadClassLoader'));
    2828
    29         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    30         if ($useStaticLoader) {
    31             require __DIR__ . '/autoload_static.php';
    32 
    33             call_user_func(\Composer\Autoload\ComposerStaticInit87708a949ac41b8ec2a1bcc62d766df7::getInitializer($loader));
    34         } else {
    35             $map = require __DIR__ . '/autoload_namespaces.php';
    36             foreach ($map as $namespace => $path) {
    37                 $loader->set($namespace, $path);
    38             }
    39 
    40             $map = require __DIR__ . '/autoload_psr4.php';
    41             foreach ($map as $namespace => $path) {
    42                 $loader->setPsr4($namespace, $path);
    43             }
    44 
    45             $classMap = require __DIR__ . '/autoload_classmap.php';
    46             if ($classMap) {
    47                 $loader->addClassMap($classMap);
    48             }
    49         }
     29        require __DIR__ . '/autoload_static.php';
     30        call_user_func(\Composer\Autoload\ComposerStaticInit87708a949ac41b8ec2a1bcc62d766df7::getInitializer($loader));
    5031
    5132        $loader->register(true);
  • gtm-ecommerce-woo/trunk/vendor/composer/installed.php

    r2889560 r2890660  
    11<?php return array(
    22    'root' => array(
    3         'pretty_version' => 'dev-main',
    4         'version' => 'dev-main',
     3        'name' => 'handcraftbyte/gtm-ecommerce-woo',
     4        'pretty_version' => '1.0.0+no-version-set',
     5        'version' => '1.0.0.0',
     6        'reference' => NULL,
    57        'type' => 'project',
    68        'install_path' => __DIR__ . '/../../../',
    79        'aliases' => array(),
    8         'reference' => '4ad796305b6627c48dc455cd25f3634361675901',
    9         'name' => 'handcraftbyte/gtm-ecommerce-woo',
    1010        'dev' => false,
    1111    ),
    1212    'versions' => array(
    1313        'handcraftbyte/gtm-ecommerce-woo' => array(
    14             'pretty_version' => 'dev-main',
    15             'version' => 'dev-main',
     14            'pretty_version' => '1.0.0+no-version-set',
     15            'version' => '1.0.0.0',
     16            'reference' => NULL,
    1617            'type' => 'project',
    1718            'install_path' => __DIR__ . '/../../../',
    1819            'aliases' => array(),
    19             'reference' => '4ad796305b6627c48dc455cd25f3634361675901',
    2020            'dev_requirement' => false,
    2121        ),
Note: See TracChangeset for help on using the changeset viewer.