Plugin Directory

Changeset 3194929


Ignore:
Timestamp:
11/22/2024 12:15:44 PM (15 months ago)
Author:
robertosnap
Message:

Update to version 7.7.2 from GitHub

Location:
logistra-woocommerce-integrasjon-fra-wildrobot-app
Files:
70 added
12 deleted
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/README.txt

    r3194454 r3194929  
    55Requires at least: 5.1
    66Tested up to: 6.6.2
    7 Stable tag: 7.7.1
     7Stable tag: 7.7.2
    88WC requires at least: 3.0.0
    99WC tested up to: 9.3.2
     
    4949== Changelog ==
    5050
     51
     52= 7.7.2 =
     53* NEW Bulk print freight labels.
     54
    5155= 7.7.1 =
    5256* FIX Bug where "egen kolli" would create a package with 0 weight which would not be able to estimate.
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/includes/class-wildrobot-logistra-order-utils.php

    r3194454 r3194929  
    11<?php
     2
     3use TCPDI;
     4
     5
    26
    37class Wildrobot_Logistra_Order_Utils
     
    1721    {
    1822        $actions['send_order_transport'] = __('Send via Wildrobot frakt', 'wildrobot-logistra');
     23        $actions['wildrobot_print_freight_labels'] = __('Print fraktetiketter', 'wildrobot-logistra');
    1924        return $actions;
     25    }
     26
     27
     28    public function bulk_print_freight_labels($redirect_to, $action, $post_ids)
     29    {
     30        if ($action !== 'wildrobot_print_freight_labels') {
     31            return $redirect_to;
     32        }
     33
     34
     35        // Create new TCPDI object
     36        $pdf = new TCPDI();
     37
     38        // Disable header and footer
     39        $pdf->setPrintHeader(false);
     40        $pdf->setPrintFooter(false);
     41
     42        // Set margins to zero
     43        $pdf->SetMargins(0, 0, 0);
     44        // $pdf->SetAutoPageBreak(false, 0);
     45
     46
     47        $logger = new WC_Logger();
     48        $context = ['source' => 'wildrobot-logistra-bulk'];
     49
     50        try {
     51            $pdf_urls = [];
     52            $temp_files = [];
     53
     54            // Collect PDF URLs
     55            foreach ($post_ids as $order_id) {
     56                $order = wc_get_order($order_id);
     57                if (!$order) {
     58                    continue;
     59                }
     60
     61                $label_url = $order->get_meta('logistra-robots-freight-label-url', true);
     62                if (empty($label_url)) {
     63                    continue;
     64                }
     65                $pdf_urls[] = $label_url;
     66            }
     67
     68            if (empty($pdf_urls)) {
     69                $logger->info('No PDF URLs found for the selected orders.', $context);
     70                wp_die('No freight labels found for the selected orders.');
     71            }
     72
     73            foreach ($pdf_urls as $url) {
     74                $content = file_get_contents($url);
     75                if ($content === false) {
     76                    // Log error and skip this URL
     77                    $logger->error('Failed to retrieve content from URL: ' . $url, $context);
     78                    continue;
     79                }
     80
     81                // Write content to a temporary file
     82                $tempFilePath = tempnam(sys_get_temp_dir(), 'pdf_');
     83                file_put_contents($tempFilePath, $content);
     84                $temp_files[] = $tempFilePath;
     85
     86                try {
     87                    $pageCount = $pdf->setSourceFile($tempFilePath);
     88
     89                    for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
     90                        $tplIdx = $pdf->importPage($pageNo);
     91                        $size = $pdf->getTemplateSize($tplIdx);
     92
     93                        $pdf->AddPage($size['orientation'], [102, 192]); // Endre til A4 her hvis man trenger
     94                        $pdf->useTemplate($tplIdx);
     95                    }
     96                } catch (Exception $e) {
     97                    // Log the exception and continue with the next PDF
     98                    $logger->error('Error processing PDF from URL: ' . $url . ' - ' . $e->getMessage(), $context);
     99                }
     100            }
     101
     102            // Clean up temporary files
     103            foreach ($temp_files as $file) {
     104                if (file_exists($file)) {
     105                    unlink($file);
     106                }
     107            }
     108
     109
     110            // Check if any pages were added
     111            if ($pdf->PageNo() == 0) {
     112                $logger->info('No pages added to the PDF.', $context);
     113                wp_die('No valid freight labels found to merge.');
     114            }
     115
     116            // Clean the output buffer if any
     117            if (ob_get_length()) ob_end_clean();
     118
     119            // Send headers to initiate file download
     120            header('Content-Type: application/pdf');
     121            header('Content-Disposition: attachment; filename="freight_labels_merged.pdf"');
     122            header('Cache-Control: private, max-age=0, must-revalidate');
     123            header('Pragma: public');
     124
     125            // Output the merged PDF
     126            $pdf->Output('freight_labels_merged.pdf', 'I');
     127
     128            // Terminate to prevent further output
     129            exit;
     130        } catch (Exception $e) {
     131            $logger->error('Error in bulk print freight labels: ' . $e->getMessage(), $context);
     132            wp_die('An error occurred while generating the merged freight labels.');
     133        }
     134    }
     135
     136    public function display_freight_labels_notices()
     137    {
     138        $notice = get_transient('wildrobot_freight_labels_notice');
     139        if ($notice) {
     140            echo '<div class="notice notice-' . esc_attr($notice['type']) . ' is-dismissible">';
     141            echo '<p>' . esc_html($notice['message']) . '</p>';
     142            echo '</div>';
     143            delete_transient('wildrobot_freight_labels_notice');
     144        }
    20145    }
    21146
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/includes/class-wildrobot-logistra.php

    r3191138 r3194929  
    237237        // Action for bulk
    238238        $this->loader->add_filter('handle_bulk_actions-edit-shop_order', $order_utils, "bulk_send_order", 10, 3);
     239        $this->loader->add_filter('handle_bulk_actions-woocommerce_page_wc-orders', $order_utils, "bulk_send_order", 10, 3);
     240        $this->loader->add_filter('handle_bulk_actions-edit-shop_order', $order_utils, "bulk_print_freight_labels", 10, 3);
     241        $this->loader->add_filter('handle_bulk_actions-woocommerce_page_wc-orders', $order_utils, "bulk_print_freight_labels", 10, 3);
    239242        $this->loader->add_filter('handle_bulk_actions-edit-shop_order', $picklist, "bulk_picklist_order", 10, 3);
     243        $this->loader->add_filter('handle_bulk_actions-woocommerce_page_wc-orders', $picklist, "bulk_picklist_order", 10, 3);
    240244        // Show bulk action notices
    241245        $this->loader->add_action('admin_notices', $order_utils, "display_bulk_action_notices");
    242246        $this->loader->add_action('admin_notices', $picklist, "display_bulk_picklist_notices");
     247        $this->loader->add_action('admin_notices', $order_utils, "display_freight_labels_notices");
    243248
    244249        //
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/logistra-robots.php

    r3194454 r3194929  
    1717 * Plugin URI:        https://wildrobot.app/wildrobot-logistra-cargonizer-woocommerce-integrasjon/
    1818 * Description:       Integrate WooCommerce with Logistra Cargonizer or Profrakt - Freight administration made easy by Wildrobot!
    19  * Version:           7.7.1
     19 * Version:           7.7.2
    2020 * Author:            Robertosnap
    2121 * Author URI:        https://wildrobot.app/wildrobot-logistra-cargonizer-woocommerce-integrasjon/
     
    3939 * Rename this for your plugin and update it as you release new versions.
    4040 */
    41 define('WILDROBOT_LOGISTRA_VERSION', '7.7.1');
     41define('WILDROBOT_LOGISTRA_VERSION', '7.7.2');
    4242
    4343/**
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/autoload.php

    r2919489 r3194929  
    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
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/ClassLoader.php

    r2919489 r3194929  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    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 }
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/InstalledVersions.php

    r2919489 r3194929  
    2222 *
    2323 * To require its presence, you can require `composer-runtime-api ^2.0`
     24 *
     25 * @final
    2426 */
    2527class InstalledVersions
     
    2729    /**
    2830     * @var mixed[]|null
    29      * @psalm-var 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}>}|array{}|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
    3032     */
    3133    private static $installed;
     
    3840    /**
    3941     * @var array[]
    40      * @psalm-var array<string, 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}>}>
     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[]}>}>
    4143     */
    4244    private static $installedByVendor = array();
     
    9799        foreach (self::getInstalled() as $installed) {
    98100            if (isset($installed['versions'][$packageName])) {
    99                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    100102            }
    101103        }
     
    118120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    119121    {
    120         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    121123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    122124
     
    242244    /**
    243245     * @return array
    244      * @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}
    245247     */
    246248    public static function getRootPackage()
     
    256258     * @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.
    257259     * @return array[]
    258      * @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[]}>}
    259261     */
    260262    public static function getRawData()
     
    279281     *
    280282     * @return array[]
    281      * @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[]}>}>
    282284     */
    283285    public static function getAllRawData()
     
    302304     * @return void
    303305     *
    304      * @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
    305307     */
    306308    public static function reload($data)
     
    312314    /**
    313315     * @return array[]
    314      * @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[]}>}>
    315317     */
    316318    private static function getInstalled()
     
    327329                    $installed[] = self::$installedByVendor[$vendorDir];
    328330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    329                     $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;
    330334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331335                        self::$installed = $installed[count($installed) - 1];
     
    339343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340344            if (substr(__DIR__, -8, 1) !== 'C') {
    341                 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;
    342348            } else {
    343349                self::$installed = array();
    344350            }
    345351        }
    346         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    347356
    348357        return $installed;
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/autoload_classmap.php

    r2919489 r3194929  
    33// autoload_classmap.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
     
    99    'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
    1010    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
     11    'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
     12    'FPDF' => $vendorDir . '/propa/tcpdi/tcpdi.php',
     13    'FPDF_TPL' => $vendorDir . '/propa/tcpdi/fpdf_tpl.php',
     14    'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
     15    'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    1116    'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
     17    'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php',
     18    'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php',
     19    'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
     20    'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
     21    'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
     22    'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
     23    'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
     24    'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
     25    'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php',
     26    'TCPDF_IMPORT' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_import.php',
     27    'TCPDF_PARSER' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_parser.php',
     28    'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     29    'TCPDI' => $vendorDir . '/propa/tcpdi/tcpdi.php',
     30    'TcpdiParserException' => $vendorDir . '/propa/tcpdi/tcpdi_parser.php',
    1231    'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
    1332    'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
     33    'tcpdi_parser' => $vendorDir . '/propa/tcpdi/tcpdi_parser.php',
    1434);
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/autoload_files.php

    r2919489 r3194929  
    33// autoload_files.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/autoload_namespaces.php

    r2919489 r3194929  
    33// autoload_namespaces.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/autoload_psr4.php

    r2919489 r3194929  
    33// autoload_psr4.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/autoload_real.php

    r2919489 r3194929  
    2626
    2727        spl_autoload_register(array('ComposerAutoloaderInit8202a76d55104f32e57c3f6b4ebe44f3', 'loadClassLoader'), true, true);
    28         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
     28        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    2929        spl_autoload_unregister(array('ComposerAutoloaderInit8202a76d55104f32e57c3f6b4ebe44f3', 'loadClassLoader'));
    3030
    31         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    32         if ($useStaticLoader) {
    33             require __DIR__ . '/autoload_static.php';
    34 
    35             call_user_func(\Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::getInitializer($loader));
    36         } else {
    37             $map = require __DIR__ . '/autoload_namespaces.php';
    38             foreach ($map as $namespace => $path) {
    39                 $loader->set($namespace, $path);
    40             }
    41 
    42             $map = require __DIR__ . '/autoload_psr4.php';
    43             foreach ($map as $namespace => $path) {
    44                 $loader->setPsr4($namespace, $path);
    45             }
    46 
    47             $classMap = require __DIR__ . '/autoload_classmap.php';
    48             if ($classMap) {
    49                 $loader->addClassMap($classMap);
    50             }
    51         }
     31        require __DIR__ . '/autoload_static.php';
     32        call_user_func(\Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::getInitializer($loader));
    5233
    5334        $loader->register(true);
    5435
    55         if ($useStaticLoader) {
    56             $includeFiles = Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::$files;
    57         } else {
    58             $includeFiles = require __DIR__ . '/autoload_files.php';
    59         }
    60         foreach ($includeFiles as $fileIdentifier => $file) {
    61             composerRequire8202a76d55104f32e57c3f6b4ebe44f3($fileIdentifier, $file);
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::$files;
     37        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
     38            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     39                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     40
     41                require $file;
     42            }
     43        }, null, null);
     44        foreach ($filesToLoad as $fileIdentifier => $file) {
     45            $requireFile($fileIdentifier, $file);
    6246        }
    6347
     
    6549    }
    6650}
    67 
    68 /**
    69  * @param string $fileIdentifier
    70  * @param string $file
    71  * @return void
    72  */
    73 function composerRequire8202a76d55104f32e57c3f6b4ebe44f3($fileIdentifier, $file)
    74 {
    75     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
    76         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    77 
    78         require $file;
    79     }
    80 }
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/autoload_static.php

    r2919489 r3194929  
    2828        'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
    2929        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
     30        'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
     31        'FPDF' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi.php',
     32        'FPDF_TPL' => __DIR__ . '/..' . '/propa/tcpdi/fpdf_tpl.php',
     33        'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
     34        'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    3035        'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
     36        'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php',
     37        'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php',
     38        'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
     39        'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
     40        'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
     41        'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
     42        'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
     43        'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
     44        'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php',
     45        'TCPDF_IMPORT' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_import.php',
     46        'TCPDF_PARSER' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_parser.php',
     47        'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     48        'TCPDI' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi.php',
     49        'TcpdiParserException' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi_parser.php',
    3150        'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
    3251        'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
     52        'tcpdi_parser' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi_parser.php',
    3353    );
    3454
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/installed.json

    r2919489 r3194929  
    11{
    22    "packages": [
     3        {
     4            "name": "propa/tcpdi",
     5            "version": "v1.3.5",
     6            "version_normalized": "1.3.5.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/kulbakin/tcpdi.git",
     10                "reference": "4fec3053f8792e3c546eab62d82f6ce42925169b"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/kulbakin/tcpdi/zipball/4fec3053f8792e3c546eab62d82f6ce42925169b",
     15                "reference": "4fec3053f8792e3c546eab62d82f6ce42925169b",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "php": ">=5.3.0",
     20                "tecnickcom/tcpdf": "^6.3"
     21            },
     22            "time": "2024-03-25T15:38:23+00:00",
     23            "type": "library",
     24            "installation-source": "dist",
     25            "autoload": {
     26                "classmap": [
     27                    "fpdf_tpl.php",
     28                    "tcpdi.php",
     29                    "tcpdi_parser.php"
     30                ]
     31            },
     32            "notification-url": "https://packagist.org/downloads/",
     33            "license": [
     34                "Apache-2.0"
     35            ],
     36            "authors": [
     37                {
     38                    "name": "Nicola Asuni",
     39                    "email": "[email protected]",
     40                    "homepage": "http://nicolaasuni.tecnick.com"
     41                }
     42            ],
     43            "description": "TCPDI is a PHP class for importing PDF to use with TCPDF",
     44            "keywords": [
     45                "TCPDF",
     46                "pdf",
     47                "tcpdi",
     48                "tcpdi_parser"
     49            ],
     50            "support": {
     51                "source": "https://github.com/kulbakin/tcpdi/tree/v1.3.5"
     52            },
     53            "install-path": "../propa/tcpdi"
     54        },
    355        {
    456            "name": "symfony/polyfill-php80",
     
    86138            ],
    87139            "install-path": "../symfony/polyfill-php80"
     140        },
     141        {
     142            "name": "tecnickcom/tcpdf",
     143            "version": "6.7.7",
     144            "version_normalized": "6.7.7.0",
     145            "source": {
     146                "type": "git",
     147                "url": "https://github.com/tecnickcom/TCPDF.git",
     148                "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086"
     149            },
     150            "dist": {
     151                "type": "zip",
     152                "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/cfbc0028cc23f057f2baf9e73bdc238153c22086",
     153                "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086",
     154                "shasum": ""
     155            },
     156            "require": {
     157                "php": ">=5.5.0"
     158            },
     159            "time": "2024-10-26T12:15:02+00:00",
     160            "type": "library",
     161            "installation-source": "dist",
     162            "autoload": {
     163                "classmap": [
     164                    "config",
     165                    "include",
     166                    "tcpdf.php",
     167                    "tcpdf_parser.php",
     168                    "tcpdf_import.php",
     169                    "tcpdf_barcodes_1d.php",
     170                    "tcpdf_barcodes_2d.php",
     171                    "include/tcpdf_colors.php",
     172                    "include/tcpdf_filters.php",
     173                    "include/tcpdf_font_data.php",
     174                    "include/tcpdf_fonts.php",
     175                    "include/tcpdf_images.php",
     176                    "include/tcpdf_static.php",
     177                    "include/barcodes/datamatrix.php",
     178                    "include/barcodes/pdf417.php",
     179                    "include/barcodes/qrcode.php"
     180                ]
     181            },
     182            "notification-url": "https://packagist.org/downloads/",
     183            "license": [
     184                "LGPL-3.0-or-later"
     185            ],
     186            "authors": [
     187                {
     188                    "name": "Nicola Asuni",
     189                    "email": "[email protected]",
     190                    "role": "lead"
     191                }
     192            ],
     193            "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
     194            "homepage": "http://www.tcpdf.org/",
     195            "keywords": [
     196                "PDFD32000-2008",
     197                "TCPDF",
     198                "barcodes",
     199                "datamatrix",
     200                "pdf",
     201                "pdf417",
     202                "qrcode"
     203            ],
     204            "support": {
     205                "issues": "https://github.com/tecnickcom/TCPDF/issues",
     206                "source": "https://github.com/tecnickcom/TCPDF/tree/6.7.7"
     207            },
     208            "funding": [
     209                {
     210                    "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&[email protected]&item_name=donation%20for%20tcpdf%20project",
     211                    "type": "custom"
     212                }
     213            ],
     214            "install-path": "../tecnickcom/tcpdf"
    88215        }
    89216    ],
    90     "dev": true,
     217    "dev": false,
    91218    "dev-package-names": []
    92219}
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/tags/7.7.2/vendor/composer/installed.php

    r2919489 r3194929  
    11<?php return array(
    22    'root' => array(
     3        'name' => '__root__',
    34        'pretty_version' => 'dev-main',
    45        'version' => 'dev-main',
     6        'reference' => '39b85974979001b50dd67da6084b5dc5ce29b1d5',
    57        'type' => 'library',
    68        'install_path' => __DIR__ . '/../../',
    79        'aliases' => array(),
    8         'reference' => '9a01366b969543dd19856d4d4ab36e5790500045',
    9         'name' => '__root__',
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
     16            'reference' => '39b85974979001b50dd67da6084b5dc5ce29b1d5',
    1617            'type' => 'library',
    1718            'install_path' => __DIR__ . '/../../',
    1819            'aliases' => array(),
    19             'reference' => '9a01366b969543dd19856d4d4ab36e5790500045',
     20            'dev_requirement' => false,
     21        ),
     22        'propa/tcpdi' => array(
     23            'pretty_version' => 'v1.3.5',
     24            'version' => '1.3.5.0',
     25            'reference' => '4fec3053f8792e3c546eab62d82f6ce42925169b',
     26            'type' => 'library',
     27            'install_path' => __DIR__ . '/../propa/tcpdi',
     28            'aliases' => array(),
    2029            'dev_requirement' => false,
    2130        ),
     
    2332            'pretty_version' => 'v1.24.0',
    2433            'version' => '1.24.0.0',
     34            'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
    2535            'type' => 'library',
    2636            'install_path' => __DIR__ . '/../symfony/polyfill-php80',
    2737            'aliases' => array(),
    28             'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
     38            'dev_requirement' => false,
     39        ),
     40        'tecnickcom/tcpdf' => array(
     41            'pretty_version' => '6.7.7',
     42            'version' => '6.7.7.0',
     43            'reference' => 'cfbc0028cc23f057f2baf9e73bdc238153c22086',
     44            'type' => 'library',
     45            'install_path' => __DIR__ . '/../tecnickcom/tcpdf',
     46            'aliases' => array(),
    2947            'dev_requirement' => false,
    3048        ),
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/README.txt

    r3194454 r3194929  
    55Requires at least: 5.1
    66Tested up to: 6.6.2
    7 Stable tag: 7.7.1
     7Stable tag: 7.7.2
    88WC requires at least: 3.0.0
    99WC tested up to: 9.3.2
     
    4949== Changelog ==
    5050
     51
     52= 7.7.2 =
     53* NEW Bulk print freight labels.
     54
    5155= 7.7.1 =
    5256* FIX Bug where "egen kolli" would create a package with 0 weight which would not be able to estimate.
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/includes/class-wildrobot-logistra-order-utils.php

    r3194454 r3194929  
    11<?php
     2
     3use TCPDI;
     4
     5
    26
    37class Wildrobot_Logistra_Order_Utils
     
    1721    {
    1822        $actions['send_order_transport'] = __('Send via Wildrobot frakt', 'wildrobot-logistra');
     23        $actions['wildrobot_print_freight_labels'] = __('Print fraktetiketter', 'wildrobot-logistra');
    1924        return $actions;
     25    }
     26
     27
     28    public function bulk_print_freight_labels($redirect_to, $action, $post_ids)
     29    {
     30        if ($action !== 'wildrobot_print_freight_labels') {
     31            return $redirect_to;
     32        }
     33
     34
     35        // Create new TCPDI object
     36        $pdf = new TCPDI();
     37
     38        // Disable header and footer
     39        $pdf->setPrintHeader(false);
     40        $pdf->setPrintFooter(false);
     41
     42        // Set margins to zero
     43        $pdf->SetMargins(0, 0, 0);
     44        // $pdf->SetAutoPageBreak(false, 0);
     45
     46
     47        $logger = new WC_Logger();
     48        $context = ['source' => 'wildrobot-logistra-bulk'];
     49
     50        try {
     51            $pdf_urls = [];
     52            $temp_files = [];
     53
     54            // Collect PDF URLs
     55            foreach ($post_ids as $order_id) {
     56                $order = wc_get_order($order_id);
     57                if (!$order) {
     58                    continue;
     59                }
     60
     61                $label_url = $order->get_meta('logistra-robots-freight-label-url', true);
     62                if (empty($label_url)) {
     63                    continue;
     64                }
     65                $pdf_urls[] = $label_url;
     66            }
     67
     68            if (empty($pdf_urls)) {
     69                $logger->info('No PDF URLs found for the selected orders.', $context);
     70                wp_die('No freight labels found for the selected orders.');
     71            }
     72
     73            foreach ($pdf_urls as $url) {
     74                $content = file_get_contents($url);
     75                if ($content === false) {
     76                    // Log error and skip this URL
     77                    $logger->error('Failed to retrieve content from URL: ' . $url, $context);
     78                    continue;
     79                }
     80
     81                // Write content to a temporary file
     82                $tempFilePath = tempnam(sys_get_temp_dir(), 'pdf_');
     83                file_put_contents($tempFilePath, $content);
     84                $temp_files[] = $tempFilePath;
     85
     86                try {
     87                    $pageCount = $pdf->setSourceFile($tempFilePath);
     88
     89                    for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
     90                        $tplIdx = $pdf->importPage($pageNo);
     91                        $size = $pdf->getTemplateSize($tplIdx);
     92
     93                        $pdf->AddPage($size['orientation'], [102, 192]); // Endre til A4 her hvis man trenger
     94                        $pdf->useTemplate($tplIdx);
     95                    }
     96                } catch (Exception $e) {
     97                    // Log the exception and continue with the next PDF
     98                    $logger->error('Error processing PDF from URL: ' . $url . ' - ' . $e->getMessage(), $context);
     99                }
     100            }
     101
     102            // Clean up temporary files
     103            foreach ($temp_files as $file) {
     104                if (file_exists($file)) {
     105                    unlink($file);
     106                }
     107            }
     108
     109
     110            // Check if any pages were added
     111            if ($pdf->PageNo() == 0) {
     112                $logger->info('No pages added to the PDF.', $context);
     113                wp_die('No valid freight labels found to merge.');
     114            }
     115
     116            // Clean the output buffer if any
     117            if (ob_get_length()) ob_end_clean();
     118
     119            // Send headers to initiate file download
     120            header('Content-Type: application/pdf');
     121            header('Content-Disposition: attachment; filename="freight_labels_merged.pdf"');
     122            header('Cache-Control: private, max-age=0, must-revalidate');
     123            header('Pragma: public');
     124
     125            // Output the merged PDF
     126            $pdf->Output('freight_labels_merged.pdf', 'I');
     127
     128            // Terminate to prevent further output
     129            exit;
     130        } catch (Exception $e) {
     131            $logger->error('Error in bulk print freight labels: ' . $e->getMessage(), $context);
     132            wp_die('An error occurred while generating the merged freight labels.');
     133        }
     134    }
     135
     136    public function display_freight_labels_notices()
     137    {
     138        $notice = get_transient('wildrobot_freight_labels_notice');
     139        if ($notice) {
     140            echo '<div class="notice notice-' . esc_attr($notice['type']) . ' is-dismissible">';
     141            echo '<p>' . esc_html($notice['message']) . '</p>';
     142            echo '</div>';
     143            delete_transient('wildrobot_freight_labels_notice');
     144        }
    20145    }
    21146
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/includes/class-wildrobot-logistra.php

    r3191138 r3194929  
    237237        // Action for bulk
    238238        $this->loader->add_filter('handle_bulk_actions-edit-shop_order', $order_utils, "bulk_send_order", 10, 3);
     239        $this->loader->add_filter('handle_bulk_actions-woocommerce_page_wc-orders', $order_utils, "bulk_send_order", 10, 3);
     240        $this->loader->add_filter('handle_bulk_actions-edit-shop_order', $order_utils, "bulk_print_freight_labels", 10, 3);
     241        $this->loader->add_filter('handle_bulk_actions-woocommerce_page_wc-orders', $order_utils, "bulk_print_freight_labels", 10, 3);
    239242        $this->loader->add_filter('handle_bulk_actions-edit-shop_order', $picklist, "bulk_picklist_order", 10, 3);
     243        $this->loader->add_filter('handle_bulk_actions-woocommerce_page_wc-orders', $picklist, "bulk_picklist_order", 10, 3);
    240244        // Show bulk action notices
    241245        $this->loader->add_action('admin_notices', $order_utils, "display_bulk_action_notices");
    242246        $this->loader->add_action('admin_notices', $picklist, "display_bulk_picklist_notices");
     247        $this->loader->add_action('admin_notices', $order_utils, "display_freight_labels_notices");
    243248
    244249        //
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/logistra-robots.php

    r3194454 r3194929  
    1717 * Plugin URI:        https://wildrobot.app/wildrobot-logistra-cargonizer-woocommerce-integrasjon/
    1818 * Description:       Integrate WooCommerce with Logistra Cargonizer or Profrakt - Freight administration made easy by Wildrobot!
    19  * Version:           7.7.1
     19 * Version:           7.7.2
    2020 * Author:            Robertosnap
    2121 * Author URI:        https://wildrobot.app/wildrobot-logistra-cargonizer-woocommerce-integrasjon/
     
    3939 * Rename this for your plugin and update it as you release new versions.
    4040 */
    41 define('WILDROBOT_LOGISTRA_VERSION', '7.7.1');
     41define('WILDROBOT_LOGISTRA_VERSION', '7.7.2');
    4242
    4343/**
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/autoload.php

    r2919489 r3194929  
    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
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/ClassLoader.php

    r2919489 r3194929  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    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 }
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/InstalledVersions.php

    r2919489 r3194929  
    2222 *
    2323 * To require its presence, you can require `composer-runtime-api ^2.0`
     24 *
     25 * @final
    2426 */
    2527class InstalledVersions
     
    2729    /**
    2830     * @var mixed[]|null
    29      * @psalm-var 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}>}|array{}|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
    3032     */
    3133    private static $installed;
     
    3840    /**
    3941     * @var array[]
    40      * @psalm-var array<string, 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}>}>
     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[]}>}>
    4143     */
    4244    private static $installedByVendor = array();
     
    9799        foreach (self::getInstalled() as $installed) {
    98100            if (isset($installed['versions'][$packageName])) {
    99                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    100102            }
    101103        }
     
    118120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    119121    {
    120         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    121123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    122124
     
    242244    /**
    243245     * @return array
    244      * @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}
    245247     */
    246248    public static function getRootPackage()
     
    256258     * @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.
    257259     * @return array[]
    258      * @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[]}>}
    259261     */
    260262    public static function getRawData()
     
    279281     *
    280282     * @return array[]
    281      * @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[]}>}>
    282284     */
    283285    public static function getAllRawData()
     
    302304     * @return void
    303305     *
    304      * @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
    305307     */
    306308    public static function reload($data)
     
    312314    /**
    313315     * @return array[]
    314      * @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[]}>}>
    315317     */
    316318    private static function getInstalled()
     
    327329                    $installed[] = self::$installedByVendor[$vendorDir];
    328330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    329                     $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;
    330334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331335                        self::$installed = $installed[count($installed) - 1];
     
    339343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340344            if (substr(__DIR__, -8, 1) !== 'C') {
    341                 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;
    342348            } else {
    343349                self::$installed = array();
    344350            }
    345351        }
    346         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    347356
    348357        return $installed;
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/autoload_classmap.php

    r2919489 r3194929  
    33// autoload_classmap.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
     
    99    'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
    1010    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
     11    'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
     12    'FPDF' => $vendorDir . '/propa/tcpdi/tcpdi.php',
     13    'FPDF_TPL' => $vendorDir . '/propa/tcpdi/fpdf_tpl.php',
     14    'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
     15    'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    1116    'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
     17    'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php',
     18    'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php',
     19    'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
     20    'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
     21    'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
     22    'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
     23    'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
     24    'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
     25    'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php',
     26    'TCPDF_IMPORT' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_import.php',
     27    'TCPDF_PARSER' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_parser.php',
     28    'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     29    'TCPDI' => $vendorDir . '/propa/tcpdi/tcpdi.php',
     30    'TcpdiParserException' => $vendorDir . '/propa/tcpdi/tcpdi_parser.php',
    1231    'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
    1332    'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
     33    'tcpdi_parser' => $vendorDir . '/propa/tcpdi/tcpdi_parser.php',
    1434);
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/autoload_files.php

    r2919489 r3194929  
    33// autoload_files.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/autoload_namespaces.php

    r2919489 r3194929  
    33// autoload_namespaces.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/autoload_psr4.php

    r2919489 r3194929  
    33// autoload_psr4.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/autoload_real.php

    r2919489 r3194929  
    2626
    2727        spl_autoload_register(array('ComposerAutoloaderInit8202a76d55104f32e57c3f6b4ebe44f3', 'loadClassLoader'), true, true);
    28         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
     28        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    2929        spl_autoload_unregister(array('ComposerAutoloaderInit8202a76d55104f32e57c3f6b4ebe44f3', 'loadClassLoader'));
    3030
    31         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    32         if ($useStaticLoader) {
    33             require __DIR__ . '/autoload_static.php';
    34 
    35             call_user_func(\Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::getInitializer($loader));
    36         } else {
    37             $map = require __DIR__ . '/autoload_namespaces.php';
    38             foreach ($map as $namespace => $path) {
    39                 $loader->set($namespace, $path);
    40             }
    41 
    42             $map = require __DIR__ . '/autoload_psr4.php';
    43             foreach ($map as $namespace => $path) {
    44                 $loader->setPsr4($namespace, $path);
    45             }
    46 
    47             $classMap = require __DIR__ . '/autoload_classmap.php';
    48             if ($classMap) {
    49                 $loader->addClassMap($classMap);
    50             }
    51         }
     31        require __DIR__ . '/autoload_static.php';
     32        call_user_func(\Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::getInitializer($loader));
    5233
    5334        $loader->register(true);
    5435
    55         if ($useStaticLoader) {
    56             $includeFiles = Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::$files;
    57         } else {
    58             $includeFiles = require __DIR__ . '/autoload_files.php';
    59         }
    60         foreach ($includeFiles as $fileIdentifier => $file) {
    61             composerRequire8202a76d55104f32e57c3f6b4ebe44f3($fileIdentifier, $file);
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit8202a76d55104f32e57c3f6b4ebe44f3::$files;
     37        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
     38            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     39                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     40
     41                require $file;
     42            }
     43        }, null, null);
     44        foreach ($filesToLoad as $fileIdentifier => $file) {
     45            $requireFile($fileIdentifier, $file);
    6246        }
    6347
     
    6549    }
    6650}
    67 
    68 /**
    69  * @param string $fileIdentifier
    70  * @param string $file
    71  * @return void
    72  */
    73 function composerRequire8202a76d55104f32e57c3f6b4ebe44f3($fileIdentifier, $file)
    74 {
    75     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
    76         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    77 
    78         require $file;
    79     }
    80 }
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/autoload_static.php

    r2919489 r3194929  
    2828        'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
    2929        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
     30        'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
     31        'FPDF' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi.php',
     32        'FPDF_TPL' => __DIR__ . '/..' . '/propa/tcpdi/fpdf_tpl.php',
     33        'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
     34        'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    3035        'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
     36        'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php',
     37        'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php',
     38        'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
     39        'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
     40        'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
     41        'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
     42        'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
     43        'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
     44        'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php',
     45        'TCPDF_IMPORT' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_import.php',
     46        'TCPDF_PARSER' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_parser.php',
     47        'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     48        'TCPDI' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi.php',
     49        'TcpdiParserException' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi_parser.php',
    3150        'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
    3251        'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
     52        'tcpdi_parser' => __DIR__ . '/..' . '/propa/tcpdi/tcpdi_parser.php',
    3353    );
    3454
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/installed.json

    r2919489 r3194929  
    11{
    22    "packages": [
     3        {
     4            "name": "propa/tcpdi",
     5            "version": "v1.3.5",
     6            "version_normalized": "1.3.5.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/kulbakin/tcpdi.git",
     10                "reference": "4fec3053f8792e3c546eab62d82f6ce42925169b"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/kulbakin/tcpdi/zipball/4fec3053f8792e3c546eab62d82f6ce42925169b",
     15                "reference": "4fec3053f8792e3c546eab62d82f6ce42925169b",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "php": ">=5.3.0",
     20                "tecnickcom/tcpdf": "^6.3"
     21            },
     22            "time": "2024-03-25T15:38:23+00:00",
     23            "type": "library",
     24            "installation-source": "dist",
     25            "autoload": {
     26                "classmap": [
     27                    "fpdf_tpl.php",
     28                    "tcpdi.php",
     29                    "tcpdi_parser.php"
     30                ]
     31            },
     32            "notification-url": "https://packagist.org/downloads/",
     33            "license": [
     34                "Apache-2.0"
     35            ],
     36            "authors": [
     37                {
     38                    "name": "Nicola Asuni",
     39                    "email": "[email protected]",
     40                    "homepage": "http://nicolaasuni.tecnick.com"
     41                }
     42            ],
     43            "description": "TCPDI is a PHP class for importing PDF to use with TCPDF",
     44            "keywords": [
     45                "TCPDF",
     46                "pdf",
     47                "tcpdi",
     48                "tcpdi_parser"
     49            ],
     50            "support": {
     51                "source": "https://github.com/kulbakin/tcpdi/tree/v1.3.5"
     52            },
     53            "install-path": "../propa/tcpdi"
     54        },
    355        {
    456            "name": "symfony/polyfill-php80",
     
    86138            ],
    87139            "install-path": "../symfony/polyfill-php80"
     140        },
     141        {
     142            "name": "tecnickcom/tcpdf",
     143            "version": "6.7.7",
     144            "version_normalized": "6.7.7.0",
     145            "source": {
     146                "type": "git",
     147                "url": "https://github.com/tecnickcom/TCPDF.git",
     148                "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086"
     149            },
     150            "dist": {
     151                "type": "zip",
     152                "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/cfbc0028cc23f057f2baf9e73bdc238153c22086",
     153                "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086",
     154                "shasum": ""
     155            },
     156            "require": {
     157                "php": ">=5.5.0"
     158            },
     159            "time": "2024-10-26T12:15:02+00:00",
     160            "type": "library",
     161            "installation-source": "dist",
     162            "autoload": {
     163                "classmap": [
     164                    "config",
     165                    "include",
     166                    "tcpdf.php",
     167                    "tcpdf_parser.php",
     168                    "tcpdf_import.php",
     169                    "tcpdf_barcodes_1d.php",
     170                    "tcpdf_barcodes_2d.php",
     171                    "include/tcpdf_colors.php",
     172                    "include/tcpdf_filters.php",
     173                    "include/tcpdf_font_data.php",
     174                    "include/tcpdf_fonts.php",
     175                    "include/tcpdf_images.php",
     176                    "include/tcpdf_static.php",
     177                    "include/barcodes/datamatrix.php",
     178                    "include/barcodes/pdf417.php",
     179                    "include/barcodes/qrcode.php"
     180                ]
     181            },
     182            "notification-url": "https://packagist.org/downloads/",
     183            "license": [
     184                "LGPL-3.0-or-later"
     185            ],
     186            "authors": [
     187                {
     188                    "name": "Nicola Asuni",
     189                    "email": "[email protected]",
     190                    "role": "lead"
     191                }
     192            ],
     193            "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
     194            "homepage": "http://www.tcpdf.org/",
     195            "keywords": [
     196                "PDFD32000-2008",
     197                "TCPDF",
     198                "barcodes",
     199                "datamatrix",
     200                "pdf",
     201                "pdf417",
     202                "qrcode"
     203            ],
     204            "support": {
     205                "issues": "https://github.com/tecnickcom/TCPDF/issues",
     206                "source": "https://github.com/tecnickcom/TCPDF/tree/6.7.7"
     207            },
     208            "funding": [
     209                {
     210                    "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&[email protected]&item_name=donation%20for%20tcpdf%20project",
     211                    "type": "custom"
     212                }
     213            ],
     214            "install-path": "../tecnickcom/tcpdf"
    88215        }
    89216    ],
    90     "dev": true,
     217    "dev": false,
    91218    "dev-package-names": []
    92219}
  • logistra-woocommerce-integrasjon-fra-wildrobot-app/trunk/vendor/composer/installed.php

    r2919489 r3194929  
    11<?php return array(
    22    'root' => array(
     3        'name' => '__root__',
    34        'pretty_version' => 'dev-main',
    45        'version' => 'dev-main',
     6        'reference' => '39b85974979001b50dd67da6084b5dc5ce29b1d5',
    57        'type' => 'library',
    68        'install_path' => __DIR__ . '/../../',
    79        'aliases' => array(),
    8         'reference' => '9a01366b969543dd19856d4d4ab36e5790500045',
    9         'name' => '__root__',
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
     16            'reference' => '39b85974979001b50dd67da6084b5dc5ce29b1d5',
    1617            'type' => 'library',
    1718            'install_path' => __DIR__ . '/../../',
    1819            'aliases' => array(),
    19             'reference' => '9a01366b969543dd19856d4d4ab36e5790500045',
     20            'dev_requirement' => false,
     21        ),
     22        'propa/tcpdi' => array(
     23            'pretty_version' => 'v1.3.5',
     24            'version' => '1.3.5.0',
     25            'reference' => '4fec3053f8792e3c546eab62d82f6ce42925169b',
     26            'type' => 'library',
     27            'install_path' => __DIR__ . '/../propa/tcpdi',
     28            'aliases' => array(),
    2029            'dev_requirement' => false,
    2130        ),
     
    2332            'pretty_version' => 'v1.24.0',
    2433            'version' => '1.24.0.0',
     34            'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
    2535            'type' => 'library',
    2636            'install_path' => __DIR__ . '/../symfony/polyfill-php80',
    2737            'aliases' => array(),
    28             'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
     38            'dev_requirement' => false,
     39        ),
     40        'tecnickcom/tcpdf' => array(
     41            'pretty_version' => '6.7.7',
     42            'version' => '6.7.7.0',
     43            'reference' => 'cfbc0028cc23f057f2baf9e73bdc238153c22086',
     44            'type' => 'library',
     45            'install_path' => __DIR__ . '/../tecnickcom/tcpdf',
     46            'aliases' => array(),
    2947            'dev_requirement' => false,
    3048        ),
Note: See TracChangeset for help on using the changeset viewer.