Plugin Directory

Changeset 3699779


Ignore:
Timestamp:
09/17/2026 08:18:17 AM (5 weeks ago)
Author:
skfaktura
Message:

Release 0.9.17

Location:
skfaktura-sk-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • skfaktura-sk-for-woocommerce/trunk/includes/class-skfaktura-woocommerce.php

    r3694068 r3699779  
    118118        add_action('woocommerce_order_details_after_order_table', [$this, 'render_shipment_tracking'], 16);
    119119        add_action('woocommerce_email_after_order_table', [$this, 'render_document_links_in_email'], 15, 4);
    120         add_action('woocommerce_email_after_order_table', [$this, 'render_shipment_tracking_in_email'], 16, 4);
     120        add_action('woocommerce_email_after_order_table', [$this, 'render_shipment_tracking_in_email'], PHP_INT_MAX, 4);
    121121    }
    122122
    … …  
    17231723            return;
    17241724        }
    1725 
    17261725        echo '<section class="woocommerce-order-downloads skfaktura-shipment-tracking"><h2>Sledovanie zásielky</h2>';
    17271726        echo '<p>'.esc_html($tracking['provider_label'].' – '.$tracking['number']).'</p>';
    … …  
    17411740            $order = $freshOrder;
    17421741        }
    1743         if ((string) $order->get_meta(self::META_TRACKING_NATIVE) === 'yes') {
    1744             return;
    1745         }
    1746 
    17471742        $tracking = $this->shipment_tracking_data($order);
    17481743        if ($tracking === null) {
     1744            return;
     1745        }
     1746        if ($this->email_output_contains_tracking_url($tracking['url'])) {
    17491747            return;
    17501748        }
    … …  
    17611759        echo '<p>'.esc_html($tracking['provider_label'].' – '.$tracking['number']).'</p>';
    17621760        echo '<p><a href="'.esc_url($tracking['url']).'" target="_blank" rel="noopener" style="'.esc_attr($this->button_style()).'">Sledovať zásielku</a></p>';
     1761    }
     1762
     1763    private function email_output_contains_tracking_url(string $trackingUrl): bool
     1764    {
     1765        $output = ob_get_contents();
     1766        if (! is_string($output) || $output === '') {
     1767            return false;
     1768        }
     1769
     1770        return strpos(html_entity_decode($output, ENT_QUOTES | ENT_HTML5, 'UTF-8'), $trackingUrl) !== false;
    17631771    }
    17641772
  • skfaktura-sk-for-woocommerce/trunk/readme.txt

    r3694068 r3699779  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.9.16
     7Stable tag: 0.9.17
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7979== Changelog ==
    8080
     81= 0.9.17 =
     82* Odkaz na sledovanie sa spoľahlivo zobrazí v zákazníckom e-maile „Vybavená objednávka“ aj pri aktívnom kompatibilnom doplnku na sledovanie zásielok, bez zdvojenia už vykresleného odkazu.
     83
    8184= 0.9.16 =
    8285* Odpojený e-shop si plugin zapamätá a zastaví opakovanú registráciu aj API prenosy objednávok.
  • skfaktura-sk-for-woocommerce/trunk/skfaktura-sk-for-woocommerce.php

    r3694068 r3699779  
    33 * Plugin Name: skFaktura.sk for WooCommerce
    44 * Description: Synchronizuje doklady, skladové množstvo a vybrané ceny podľa SKU medzi WooCommerce a skFaktura.sk.
    5  * Version: 0.9.16
     5 * Version: 0.9.17
    66 * Plugin URI: https://skfaktura.sk
    77 * Requires at least: 6.0
    … …  
    1616defined('ABSPATH') || exit;
    1717
    18 define('SKFAKTURA_WOO_VERSION', '0.9.16');
     18define('SKFAKTURA_WOO_VERSION', '0.9.17');
    1919define('SKFAKTURA_WOO_FILE', __FILE__);
    2020define('SKFAKTURA_WOO_DIR', plugin_dir_path(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.