Changeset 3465136
- Timestamp:
- 02/19/2026 01:54:30 PM (6 weeks ago)
- Location:
- boxo-return
- Files:
-
- 12 edited
- 1 copied
-
tags/0.0.66 (copied) (copied from boxo-return/trunk)
-
tags/0.0.66/boxo-return.php (modified) (2 diffs)
-
tags/0.0.66/checkout/boxo-checkout.js (modified) (1 diff)
-
tags/0.0.66/checkout/checkout.php (modified) (2 diffs)
-
tags/0.0.66/languages/boxo-return-nl.po (modified) (4 diffs)
-
tags/0.0.66/languages/boxo-return.pot (modified) (6 diffs)
-
tags/0.0.66/readme.txt (modified) (2 diffs)
-
trunk/boxo-return.php (modified) (2 diffs)
-
trunk/checkout/boxo-checkout.js (modified) (1 diff)
-
trunk/checkout/checkout.php (modified) (2 diffs)
-
trunk/languages/boxo-return-nl.po (modified) (4 diffs)
-
trunk/languages/boxo-return.pot (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boxo-return/tags/0.0.66/boxo-return.php
r3403900 r3465136 2 2 /* 3 3 * Plugin Name: BOXO Return 4 * Version: 0.0.6 54 * Version: 0.0.66 5 5 * Requires at least: 6.5 6 6 * Requires PHP: 7.1 … … 22 22 } 23 23 24 const BOXO_RETURN_PLUGIN_VERSION = "0.0.6 5";24 const BOXO_RETURN_PLUGIN_VERSION = "0.0.66"; 25 25 26 26 include plugin_dir_path(__FILE__) . 'includes/constants.php'; -
boxo-return/tags/0.0.66/checkout/boxo-checkout.js
r3403900 r3465136 43 43 }) 44 44 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 } 46 58 } -
boxo-return/tags/0.0.66/checkout/checkout.php
r3403900 r3465136 4 4 exit; 5 5 } 6 7 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils; 6 8 7 9 // Add Boxo features to checkout page after WooCommerce has loaded. … … 47 49 wp_enqueue_style('boxo_checkout', plugins_url('boxo-checkout.css', __FILE__), [], BOXO_RETURN_PLUGIN_VERSION); 48 50 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 ); 49 65 } 50 66 -
boxo-return/tags/0.0.66/languages/boxo-return-nl.po
r3371141 r3465136 114 114 #: admin/order.php:198 115 115 #: admin/settings.php:249 116 #: checkout/checkout.php:2 14116 #: checkout/checkout.php:236 117 117 msgid "Disposable packaging" 118 118 msgstr "Wegwerpverpakking" … … 145 145 #: admin/order.php:127 146 146 #: admin/order.php:159 147 #: checkout/checkout.php: 76148 #: checkout/checkout.php: 77147 #: checkout/checkout.php:98 148 #: checkout/checkout.php:99 149 149 msgid "Packaging" 150 150 msgstr "Verzendverpakking" … … 155 155 156 156 #: admin/order.php:97 157 #: checkout/checkout.php:1 05157 #: checkout/checkout.php:127 158 158 msgid "Disposable" 159 159 msgstr "Wegwerp" 160 160 161 #: checkout/checkout.php:2 01161 #: checkout/checkout.php:223 162 162 msgid "Deposit" 163 163 msgstr "Statiegeld" … … 179 179 msgstr "Max aantal items:" 180 180 181 #: checkout/checkout.php:1 65181 #: checkout/checkout.php:187 182 182 msgid "Reusable (deposit)" 183 183 msgstr "Herbruikbaar (statiegeld)" 184 184 185 #: checkout/checkout.php:1 69185 #: checkout/checkout.php:191 186 186 msgid "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." 187 187 msgstr "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) 202 5BOXO1 # Copyright (C) 2026 BOXO 2 2 # This file is distributed under the GPLv2. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: BOXO Return 0.0.6 2\n"5 "Project-Id-Version: BOXO Return 0.0.66\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/boxo-return\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-10-08T13:21:19+00:00\n"12 "POT-Creation-Date: 2026-02-19T13:34:32+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 51 51 #: admin/order.php:127 52 52 #: admin/order.php:159 53 #: checkout/checkout.php: 7654 #: checkout/checkout.php: 7753 #: checkout/checkout.php:98 54 #: checkout/checkout.php:99 55 55 msgid "Packaging" 56 56 msgstr "" … … 61 61 62 62 #: admin/order.php:97 63 #: checkout/checkout.php:1 0563 #: checkout/checkout.php:127 64 64 msgid "Disposable" 65 65 msgstr "" … … 72 72 #: admin/order.php:198 73 73 #: admin/settings.php:249 74 #: checkout/checkout.php:2 1474 #: checkout/checkout.php:236 75 75 msgid "Disposable packaging" 76 76 msgstr "" … … 176 176 msgstr "" 177 177 178 #: checkout/checkout.php:1 65178 #: checkout/checkout.php:187 179 179 msgid "Reusable (deposit)" 180 180 msgstr "" 181 181 182 #: checkout/checkout.php:1 69182 #: checkout/checkout.php:191 183 183 msgid "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." 184 184 msgstr "" 185 185 186 #: checkout/checkout.php:2 01186 #: checkout/checkout.php:223 187 187 msgid "Deposit" 188 188 msgstr "" -
boxo-return/tags/0.0.66/readme.txt
r3403900 r3465136 4 4 Requires at least: 6.5 5 5 Tested up to: 6.8.3 6 Stable tag: 0.0.6 56 Stable tag: 0.0.66 7 7 Requires PHP: 7.1 8 8 License: GPLv2 or later … … 26 26 27 27 == Changelog == 28 29 = 0.0.66 = 30 Show warning when Checkout Block is used. 28 31 29 32 = 0.0.65 = -
boxo-return/trunk/boxo-return.php
r3403900 r3465136 2 2 /* 3 3 * Plugin Name: BOXO Return 4 * Version: 0.0.6 54 * Version: 0.0.66 5 5 * Requires at least: 6.5 6 6 * Requires PHP: 7.1 … … 22 22 } 23 23 24 const BOXO_RETURN_PLUGIN_VERSION = "0.0.6 5";24 const BOXO_RETURN_PLUGIN_VERSION = "0.0.66"; 25 25 26 26 include plugin_dir_path(__FILE__) . 'includes/constants.php'; -
boxo-return/trunk/checkout/boxo-checkout.js
r3403900 r3465136 43 43 }) 44 44 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 } 46 58 } -
boxo-return/trunk/checkout/checkout.php
r3403900 r3465136 4 4 exit; 5 5 } 6 7 use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils; 6 8 7 9 // Add Boxo features to checkout page after WooCommerce has loaded. … … 47 49 wp_enqueue_style('boxo_checkout', plugins_url('boxo-checkout.css', __FILE__), [], BOXO_RETURN_PLUGIN_VERSION); 48 50 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 ); 49 65 } 50 66 -
boxo-return/trunk/languages/boxo-return-nl.po
r3371141 r3465136 114 114 #: admin/order.php:198 115 115 #: admin/settings.php:249 116 #: checkout/checkout.php:2 14116 #: checkout/checkout.php:236 117 117 msgid "Disposable packaging" 118 118 msgstr "Wegwerpverpakking" … … 145 145 #: admin/order.php:127 146 146 #: admin/order.php:159 147 #: checkout/checkout.php: 76148 #: checkout/checkout.php: 77147 #: checkout/checkout.php:98 148 #: checkout/checkout.php:99 149 149 msgid "Packaging" 150 150 msgstr "Verzendverpakking" … … 155 155 156 156 #: admin/order.php:97 157 #: checkout/checkout.php:1 05157 #: checkout/checkout.php:127 158 158 msgid "Disposable" 159 159 msgstr "Wegwerp" 160 160 161 #: checkout/checkout.php:2 01161 #: checkout/checkout.php:223 162 162 msgid "Deposit" 163 163 msgstr "Statiegeld" … … 179 179 msgstr "Max aantal items:" 180 180 181 #: checkout/checkout.php:1 65181 #: checkout/checkout.php:187 182 182 msgid "Reusable (deposit)" 183 183 msgstr "Herbruikbaar (statiegeld)" 184 184 185 #: checkout/checkout.php:1 69185 #: checkout/checkout.php:191 186 186 msgid "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." 187 187 msgstr "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) 202 5BOXO1 # Copyright (C) 2026 BOXO 2 2 # This file is distributed under the GPLv2. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: BOXO Return 0.0.6 2\n"5 "Project-Id-Version: BOXO Return 0.0.66\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/boxo-return\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-10-08T13:21:19+00:00\n"12 "POT-Creation-Date: 2026-02-19T13:34:32+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 51 51 #: admin/order.php:127 52 52 #: admin/order.php:159 53 #: checkout/checkout.php: 7654 #: checkout/checkout.php: 7753 #: checkout/checkout.php:98 54 #: checkout/checkout.php:99 55 55 msgid "Packaging" 56 56 msgstr "" … … 61 61 62 62 #: admin/order.php:97 63 #: checkout/checkout.php:1 0563 #: checkout/checkout.php:127 64 64 msgid "Disposable" 65 65 msgstr "" … … 72 72 #: admin/order.php:198 73 73 #: admin/settings.php:249 74 #: checkout/checkout.php:2 1474 #: checkout/checkout.php:236 75 75 msgid "Disposable packaging" 76 76 msgstr "" … … 176 176 msgstr "" 177 177 178 #: checkout/checkout.php:1 65178 #: checkout/checkout.php:187 179 179 msgid "Reusable (deposit)" 180 180 msgstr "" 181 181 182 #: checkout/checkout.php:1 69182 #: checkout/checkout.php:191 183 183 msgid "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." 184 184 msgstr "" 185 185 186 #: checkout/checkout.php:2 01186 #: checkout/checkout.php:223 187 187 msgid "Deposit" 188 188 msgstr "" -
boxo-return/trunk/readme.txt
r3403900 r3465136 4 4 Requires at least: 6.5 5 5 Tested up to: 6.8.3 6 Stable tag: 0.0.6 56 Stable tag: 0.0.66 7 7 Requires PHP: 7.1 8 8 License: GPLv2 or later … … 26 26 27 27 == Changelog == 28 29 = 0.0.66 = 30 Show warning when Checkout Block is used. 28 31 29 32 = 0.0.65 =
Note: See TracChangeset
for help on using the changeset viewer.