Plugin Directory

Changeset 3465136


Ignore:
Timestamp:
02/19/2026 01:54:30 PM (6 weeks ago)
Author:
boxodev
Message:

Update to version 0.0.66 from GitHub

Location:
boxo-return
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • boxo-return/tags/0.0.66/boxo-return.php

    r3403900 r3465136  
    22/*
    33* Plugin Name: BOXO Return
    4 * Version: 0.0.65
     4* Version: 0.0.66
    55* Requires at least: 6.5
    66* Requires PHP: 7.1
     
    2222}
    2323
    24 const BOXO_RETURN_PLUGIN_VERSION = "0.0.65";
     24const BOXO_RETURN_PLUGIN_VERSION = "0.0.66";
    2525
    2626include plugin_dir_path(__FILE__) . 'includes/constants.php';
  • boxo-return/tags/0.0.66/checkout/boxo-checkout.js

    r3403900 r3465136  
    4343    })
    4444
    45     console.info('[BOXO Return] Ready')
     45    const dataEl = document.getElementById('wp-script-module-data-boxo_checkout')
     46    try {
     47        const isBlocksCheckout = dataEl?.textContent
     48            ? JSON.parse(dataEl.textContent).isBlocksCheckout
     49            : null
     50        if (isBlocksCheckout) {
     51            console.warn('[BOXO Return] Blocks Checkout is not supported.')
     52            return
     53        }
     54        console.info('[BOXO Return] Ready')
     55    } catch (err) {
     56        console.error(err)
     57    }
    4658}
  • boxo-return/tags/0.0.66/checkout/checkout.php

    r3403900 r3465136  
    44    exit;
    55}
     6
     7use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
    68
    79// Add Boxo features to checkout page after WooCommerce has loaded.
     
    4749            wp_enqueue_style('boxo_checkout', plugins_url('boxo-checkout.css', __FILE__), [], BOXO_RETURN_PLUGIN_VERSION);
    4850            wp_enqueue_script_module('boxo_checkout', plugins_url('boxo-checkout.js', __FILE__), [], BOXO_RETURN_PLUGIN_VERSION);
     51            add_filter(
     52                'script_module_data_boxo_checkout',
     53                function ($data) {
     54                    // If filter arg type is incorrect due to external code, just get out of the way and return the arg.
     55                    if (!is_array($data)) {
     56                        return $data;
     57                    }
     58                    // @phpstan-ignore function.alreadyNarrowedType (method_exists is used to support older WooCommerce versions, it can be removed later.)
     59                    if (method_exists(CartCheckoutUtils::class, 'is_checkout_block_default')) {
     60                        $data['isBlocksCheckout'] = CartCheckoutUtils::is_checkout_block_default();
     61                    }
     62                    return $data;
     63                }
     64            );
    4965        }
    5066
  • boxo-return/tags/0.0.66/languages/boxo-return-nl.po

    r3371141 r3465136  
    114114#: admin/order.php:198
    115115#: admin/settings.php:249
    116 #: checkout/checkout.php:214
     116#: checkout/checkout.php:236
    117117msgid "Disposable packaging"
    118118msgstr "Wegwerpverpakking"
     
    145145#: admin/order.php:127
    146146#: admin/order.php:159
    147 #: checkout/checkout.php:76
    148 #: checkout/checkout.php:77
     147#: checkout/checkout.php:98
     148#: checkout/checkout.php:99
    149149msgid "Packaging"
    150150msgstr "Verzendverpakking"
     
    155155
    156156#: admin/order.php:97
    157 #: checkout/checkout.php:105
     157#: checkout/checkout.php:127
    158158msgid "Disposable"
    159159msgstr "Wegwerp"
    160160
    161 #: checkout/checkout.php:201
     161#: checkout/checkout.php:223
    162162msgid "Deposit"
    163163msgstr "Statiegeld"
     
    179179msgstr "Max aantal items:"
    180180
    181 #: checkout/checkout.php:165
     181#: checkout/checkout.php:187
    182182msgid "Reusable (deposit)"
    183183msgstr "Herbruikbaar (statiegeld)"
    184184
    185 #: checkout/checkout.php:169
     185#: checkout/checkout.php:191
    186186msgid "Nice, there is a return point near you! Return the packaging at a return point to get your deposit (€%s) back right away. Click for more information."
    187187msgstr "Yes, er is een inleverpunt in je buurt! Lever de verpakking in bij een inleverpunt en ontvang direct je statiegeld (€%s) terug. Klik voor meer informatie."
  • boxo-return/tags/0.0.66/languages/boxo-return.pot

    r3375141 r3465136  
    1 # Copyright (C) 2025 BOXO
     1# Copyright (C) 2026 BOXO
    22# This file is distributed under the GPLv2.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: BOXO Return 0.0.62\n"
     5"Project-Id-Version: BOXO Return 0.0.66\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/boxo-return\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-10-08T13:21:19+00:00\n"
     12"POT-Creation-Date: 2026-02-19T13:34:32+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    5151#: admin/order.php:127
    5252#: admin/order.php:159
    53 #: checkout/checkout.php:76
    54 #: checkout/checkout.php:77
     53#: checkout/checkout.php:98
     54#: checkout/checkout.php:99
    5555msgid "Packaging"
    5656msgstr ""
     
    6161
    6262#: admin/order.php:97
    63 #: checkout/checkout.php:105
     63#: checkout/checkout.php:127
    6464msgid "Disposable"
    6565msgstr ""
     
    7272#: admin/order.php:198
    7373#: admin/settings.php:249
    74 #: checkout/checkout.php:214
     74#: checkout/checkout.php:236
    7575msgid "Disposable packaging"
    7676msgstr ""
     
    176176msgstr ""
    177177
    178 #: checkout/checkout.php:165
     178#: checkout/checkout.php:187
    179179msgid "Reusable (deposit)"
    180180msgstr ""
    181181
    182 #: checkout/checkout.php:169
     182#: checkout/checkout.php:191
    183183msgid "Nice, there is a return point near you! Return the packaging at a return point to get your deposit (€%s) back right away. Click for more information."
    184184msgstr ""
    185185
    186 #: checkout/checkout.php:201
     186#: checkout/checkout.php:223
    187187msgid "Deposit"
    188188msgstr ""
  • boxo-return/tags/0.0.66/readme.txt

    r3403900 r3465136  
    44Requires at least: 6.5
    55Tested up to: 6.8.3
    6 Stable tag: 0.0.65
     6Stable tag: 0.0.66
    77Requires PHP: 7.1
    88License: GPLv2 or later
     
    2626
    2727== Changelog ==
     28
     29= 0.0.66 =
     30Show warning when Checkout Block is used.
    2831
    2932= 0.0.65 =
  • boxo-return/trunk/boxo-return.php

    r3403900 r3465136  
    22/*
    33* Plugin Name: BOXO Return
    4 * Version: 0.0.65
     4* Version: 0.0.66
    55* Requires at least: 6.5
    66* Requires PHP: 7.1
     
    2222}
    2323
    24 const BOXO_RETURN_PLUGIN_VERSION = "0.0.65";
     24const BOXO_RETURN_PLUGIN_VERSION = "0.0.66";
    2525
    2626include plugin_dir_path(__FILE__) . 'includes/constants.php';
  • boxo-return/trunk/checkout/boxo-checkout.js

    r3403900 r3465136  
    4343    })
    4444
    45     console.info('[BOXO Return] Ready')
     45    const dataEl = document.getElementById('wp-script-module-data-boxo_checkout')
     46    try {
     47        const isBlocksCheckout = dataEl?.textContent
     48            ? JSON.parse(dataEl.textContent).isBlocksCheckout
     49            : null
     50        if (isBlocksCheckout) {
     51            console.warn('[BOXO Return] Blocks Checkout is not supported.')
     52            return
     53        }
     54        console.info('[BOXO Return] Ready')
     55    } catch (err) {
     56        console.error(err)
     57    }
    4658}
  • boxo-return/trunk/checkout/checkout.php

    r3403900 r3465136  
    44    exit;
    55}
     6
     7use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
    68
    79// Add Boxo features to checkout page after WooCommerce has loaded.
     
    4749            wp_enqueue_style('boxo_checkout', plugins_url('boxo-checkout.css', __FILE__), [], BOXO_RETURN_PLUGIN_VERSION);
    4850            wp_enqueue_script_module('boxo_checkout', plugins_url('boxo-checkout.js', __FILE__), [], BOXO_RETURN_PLUGIN_VERSION);
     51            add_filter(
     52                'script_module_data_boxo_checkout',
     53                function ($data) {
     54                    // If filter arg type is incorrect due to external code, just get out of the way and return the arg.
     55                    if (!is_array($data)) {
     56                        return $data;
     57                    }
     58                    // @phpstan-ignore function.alreadyNarrowedType (method_exists is used to support older WooCommerce versions, it can be removed later.)
     59                    if (method_exists(CartCheckoutUtils::class, 'is_checkout_block_default')) {
     60                        $data['isBlocksCheckout'] = CartCheckoutUtils::is_checkout_block_default();
     61                    }
     62                    return $data;
     63                }
     64            );
    4965        }
    5066
  • boxo-return/trunk/languages/boxo-return-nl.po

    r3371141 r3465136  
    114114#: admin/order.php:198
    115115#: admin/settings.php:249
    116 #: checkout/checkout.php:214
     116#: checkout/checkout.php:236
    117117msgid "Disposable packaging"
    118118msgstr "Wegwerpverpakking"
     
    145145#: admin/order.php:127
    146146#: admin/order.php:159
    147 #: checkout/checkout.php:76
    148 #: checkout/checkout.php:77
     147#: checkout/checkout.php:98
     148#: checkout/checkout.php:99
    149149msgid "Packaging"
    150150msgstr "Verzendverpakking"
     
    155155
    156156#: admin/order.php:97
    157 #: checkout/checkout.php:105
     157#: checkout/checkout.php:127
    158158msgid "Disposable"
    159159msgstr "Wegwerp"
    160160
    161 #: checkout/checkout.php:201
     161#: checkout/checkout.php:223
    162162msgid "Deposit"
    163163msgstr "Statiegeld"
     
    179179msgstr "Max aantal items:"
    180180
    181 #: checkout/checkout.php:165
     181#: checkout/checkout.php:187
    182182msgid "Reusable (deposit)"
    183183msgstr "Herbruikbaar (statiegeld)"
    184184
    185 #: checkout/checkout.php:169
     185#: checkout/checkout.php:191
    186186msgid "Nice, there is a return point near you! Return the packaging at a return point to get your deposit (€%s) back right away. Click for more information."
    187187msgstr "Yes, er is een inleverpunt in je buurt! Lever de verpakking in bij een inleverpunt en ontvang direct je statiegeld (€%s) terug. Klik voor meer informatie."
  • boxo-return/trunk/languages/boxo-return.pot

    r3375141 r3465136  
    1 # Copyright (C) 2025 BOXO
     1# Copyright (C) 2026 BOXO
    22# This file is distributed under the GPLv2.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: BOXO Return 0.0.62\n"
     5"Project-Id-Version: BOXO Return 0.0.66\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/boxo-return\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-10-08T13:21:19+00:00\n"
     12"POT-Creation-Date: 2026-02-19T13:34:32+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    5151#: admin/order.php:127
    5252#: admin/order.php:159
    53 #: checkout/checkout.php:76
    54 #: checkout/checkout.php:77
     53#: checkout/checkout.php:98
     54#: checkout/checkout.php:99
    5555msgid "Packaging"
    5656msgstr ""
     
    6161
    6262#: admin/order.php:97
    63 #: checkout/checkout.php:105
     63#: checkout/checkout.php:127
    6464msgid "Disposable"
    6565msgstr ""
     
    7272#: admin/order.php:198
    7373#: admin/settings.php:249
    74 #: checkout/checkout.php:214
     74#: checkout/checkout.php:236
    7575msgid "Disposable packaging"
    7676msgstr ""
     
    176176msgstr ""
    177177
    178 #: checkout/checkout.php:165
     178#: checkout/checkout.php:187
    179179msgid "Reusable (deposit)"
    180180msgstr ""
    181181
    182 #: checkout/checkout.php:169
     182#: checkout/checkout.php:191
    183183msgid "Nice, there is a return point near you! Return the packaging at a return point to get your deposit (€%s) back right away. Click for more information."
    184184msgstr ""
    185185
    186 #: checkout/checkout.php:201
     186#: checkout/checkout.php:223
    187187msgid "Deposit"
    188188msgstr ""
  • boxo-return/trunk/readme.txt

    r3403900 r3465136  
    44Requires at least: 6.5
    55Tested up to: 6.8.3
    6 Stable tag: 0.0.65
     6Stable tag: 0.0.66
    77Requires PHP: 7.1
    88License: GPLv2 or later
     
    2626
    2727== Changelog ==
     28
     29= 0.0.66 =
     30Show warning when Checkout Block is used.
    2831
    2932= 0.0.65 =
Note: See TracChangeset for help on using the changeset viewer.