Plugin Directory

Changeset 3777423


Ignore:
Timestamp:
10/31/2026 11:35:48 PM (7 hours ago)
Author:
dominikshaim
Message:

Vydani 1.0.7: QR obrazky v transakcnich e-mailech pres Brevo

Location:
bankglyph-qr-payments
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bankglyph-qr-payments/tags/1.0.7/bankglyph-qr-payments.php

    r3771902 r3777423  
    55 * Plugin URI:        https://woomoduly.cz/produkt/bankovni-prevod-qr-platba/
    66 * Description:       Adds bank transfer payments with locally generated SPAYD QR codes and Slovak Pay by square support.
    7  * Version:           1.0.6
     7 * Version:           1.0.7
    88 * Author:            WooModuly.cz
    99 * Author URI:        https://woomoduly.cz/
    … …  
    5454// Per-plugin konstanty (unikatni prefix) - zrcadlo hub konstant, aby 2 solo
    5555// pluginy vedle sebe nesdilely cesty/URL (sdilene jmeno vyhraje prvni nactene).
    56 define('SHAIM_BANKWIRE_VERSION', '1.0.6');
     56define('SHAIM_BANKWIRE_VERSION', '1.0.7');
    5757define('SHAIM_BANKWIRE_FILE', __FILE__);
    5858define('SHAIM_BANKWIRE_DIR', plugin_dir_path(__FILE__));
  • bankglyph-qr-payments/tags/1.0.7/readme.txt

    r3771902 r3777423  
    77WC requires at least: 8.2
    88WC tested up to: 10.8
    9 Stable tag: 1.0.6
     9Stable tag: 1.0.7
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8383== Changelog ==
    8484
     85= 1.0.7 =
     86* Fixed missing QR images in transactional e-mails sent through Brevo: the e-mail now links to a PNG stored on the shop server.
     87
    8588= 1.0.6 =
    8689* Added the recipient name to the Czech QR Payment code.
  • bankglyph-qr-payments/tags/1.0.7/src/Modules/BankwireQr/Gateway.php

    r3771902 r3777423  
    2929 * IBAN-prefix-based -- no separate "CZ/SK mode" setting needed.
    3030 *
    31  * E-mails carry the QR as a PNG embedded via Content-ID: Gmail drops both inline
    32  * SVG and data URI images, Outlook, Yahoo and Seznam drop inline SVG.
     31 * E-mails link to a PNG stored in the shop uploads. CID remains a fallback when
     32 * uploads are unavailable; Brevo transactional mail does not support CID images.
    3333 *
    3434 * Discount: registered via SurchargeFee with a negative amount so the cart
    … …  
    349349
    350350    /**
    351      * Ulozi PNG z data URI pro embedEmailImages() a vrati odkaz cid: na nej. Jiny vstup nez PNG
    352      * data URI vrati prazdny retezec, takze se do e-mailu nedostane rozbity obrazek.
     351     * PNG zustava v uploads i po odeslani, aby ho klient mohl nacist pozdeji. Nazev je
     352     * vazany na tajemstvi e-shopu, ne na verejne platebni udaje. Bez uploads zustane CID.
    353353     *
    354354     * @param string $dataUri
    … …  
    362362        if ($png === false || $png === '') {
    363363            return '';
     364        }
     365
     366        $uploads = wp_upload_dir(null, false);
     367        if (empty($uploads['error'])) {
     368            $directory = $uploads['basedir'] . '/shaim-bankwire-qr';
     369            $filename = hash_hmac('sha256', $png, wp_salt('auth')) . '.png';
     370            $path = $directory . '/' . $filename;
     371            if (!is_file($path) && wp_mkdir_p($directory)) {
     372                if (!class_exists('WP_Filesystem_Direct')) {
     373                    require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
     374                    require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
     375                }
     376                $filesystem = new \WP_Filesystem_Direct(null);
     377                $temporary = tempnam($directory, 'qr-');
     378                if ($temporary !== false) {
     379                    if (file_put_contents($temporary, $png) === strlen($png)) {
     380                        // tempnam vytvori 0600; staticky obrazek musi precist take webovy server.
     381                        $stat = stat($directory);
     382                        chmod($temporary, $stat['mode'] & 0000666); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_chmod -- WP_Filesystem_Direct::chmod skips changing 0600 to 0644.
     383                        $filesystem->move($temporary, $path);
     384                    }
     385                    if (is_file($temporary)) {
     386                        wp_delete_file($temporary);
     387                    }
     388                }
     389            }
     390            if (is_file($path)) {
     391                return $uploads['baseurl'] . '/shaim-bankwire-qr/' . $filename;
     392            }
    364393        }
    365394
  • bankglyph-qr-payments/trunk/bankglyph-qr-payments.php

    r3771902 r3777423  
    55 * Plugin URI:        https://woomoduly.cz/produkt/bankovni-prevod-qr-platba/
    66 * Description:       Adds bank transfer payments with locally generated SPAYD QR codes and Slovak Pay by square support.
    7  * Version:           1.0.6
     7 * Version:           1.0.7
    88 * Author:            WooModuly.cz
    99 * Author URI:        https://woomoduly.cz/
    … …  
    5454// Per-plugin konstanty (unikatni prefix) - zrcadlo hub konstant, aby 2 solo
    5555// pluginy vedle sebe nesdilely cesty/URL (sdilene jmeno vyhraje prvni nactene).
    56 define('SHAIM_BANKWIRE_VERSION', '1.0.6');
     56define('SHAIM_BANKWIRE_VERSION', '1.0.7');
    5757define('SHAIM_BANKWIRE_FILE', __FILE__);
    5858define('SHAIM_BANKWIRE_DIR', plugin_dir_path(__FILE__));
  • bankglyph-qr-payments/trunk/readme.txt

    r3771902 r3777423  
    77WC requires at least: 8.2
    88WC tested up to: 10.8
    9 Stable tag: 1.0.6
     9Stable tag: 1.0.7
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8383== Changelog ==
    8484
     85= 1.0.7 =
     86* Fixed missing QR images in transactional e-mails sent through Brevo: the e-mail now links to a PNG stored on the shop server.
     87
    8588= 1.0.6 =
    8689* Added the recipient name to the Czech QR Payment code.
  • bankglyph-qr-payments/trunk/src/Modules/BankwireQr/Gateway.php

    r3771902 r3777423  
    2929 * IBAN-prefix-based -- no separate "CZ/SK mode" setting needed.
    3030 *
    31  * E-mails carry the QR as a PNG embedded via Content-ID: Gmail drops both inline
    32  * SVG and data URI images, Outlook, Yahoo and Seznam drop inline SVG.
     31 * E-mails link to a PNG stored in the shop uploads. CID remains a fallback when
     32 * uploads are unavailable; Brevo transactional mail does not support CID images.
    3333 *
    3434 * Discount: registered via SurchargeFee with a negative amount so the cart
    … …  
    349349
    350350    /**
    351      * Ulozi PNG z data URI pro embedEmailImages() a vrati odkaz cid: na nej. Jiny vstup nez PNG
    352      * data URI vrati prazdny retezec, takze se do e-mailu nedostane rozbity obrazek.
     351     * PNG zustava v uploads i po odeslani, aby ho klient mohl nacist pozdeji. Nazev je
     352     * vazany na tajemstvi e-shopu, ne na verejne platebni udaje. Bez uploads zustane CID.
    353353     *
    354354     * @param string $dataUri
    … …  
    362362        if ($png === false || $png === '') {
    363363            return '';
     364        }
     365
     366        $uploads = wp_upload_dir(null, false);
     367        if (empty($uploads['error'])) {
     368            $directory = $uploads['basedir'] . '/shaim-bankwire-qr';
     369            $filename = hash_hmac('sha256', $png, wp_salt('auth')) . '.png';
     370            $path = $directory . '/' . $filename;
     371            if (!is_file($path) && wp_mkdir_p($directory)) {
     372                if (!class_exists('WP_Filesystem_Direct')) {
     373                    require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
     374                    require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
     375                }
     376                $filesystem = new \WP_Filesystem_Direct(null);
     377                $temporary = tempnam($directory, 'qr-');
     378                if ($temporary !== false) {
     379                    if (file_put_contents($temporary, $png) === strlen($png)) {
     380                        // tempnam vytvori 0600; staticky obrazek musi precist take webovy server.
     381                        $stat = stat($directory);
     382                        chmod($temporary, $stat['mode'] & 0000666); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_chmod -- WP_Filesystem_Direct::chmod skips changing 0600 to 0644.
     383                        $filesystem->move($temporary, $path);
     384                    }
     385                    if (is_file($temporary)) {
     386                        wp_delete_file($temporary);
     387                    }
     388                }
     389            }
     390            if (is_file($path)) {
     391                return $uploads['baseurl'] . '/shaim-bankwire-qr/' . $filename;
     392            }
    364393        }
    365394
Note: See TracChangeset for help on using the changeset viewer.