فهرست منبع

Decode WC currency symbol + priceFormat before handing to JS — v1.5.9 -> v1.5.10

WooCommerce returns get_woocommerce_currency_symbol() and
get_woocommerce_price_format() with HTML entities in them (Kč
for Kč,   in the Czech price format). formatPricePlain() — used to
build <option> labels in the variant combobox — assigns its result via
.text(), so entities rendered verbatim as "10,00&nbsp;&#75;&#269;"
instead of "10,00 Kč". Decode with html_entity_decode at the localize
step; formatPriceHtml keeps working since inserting decoded characters
into HTML is still safe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dalibor Votruba 2 ماه پیش
والد
کامیت
603c2c6b1c

+ 1 - 1
studiou-wc-free-photo-product/CLAUDE.md

@@ -2,7 +2,7 @@
 
 
 ## Project Overview
 ## Project Overview
 
 
-WordPress/WooCommerce plugin called **studiou-wc-free-photo-product** (QDR - Studiou WC Free Photo Product) v1.5.9.
+WordPress/WooCommerce plugin called **studiou-wc-free-photo-product** (QDR - Studiou WC Free Photo Product) v1.5.10.
 Allows publishing special variable products where customers upload custom raw images to be printed for a price.
 Allows publishing special variable products where customers upload custom raw images to be printed for a price.
 
 
 ## Initial Requirements
 ## Initial Requirements

+ 1 - 1
studiou-wc-free-photo-product/languages/studiou-wc-free-photo-product-cs_CZ.po

@@ -3,7 +3,7 @@
 # This file is distributed under the GPL v2 or later.
 # This file is distributed under the GPL v2 or later.
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
-"Project-Id-Version: QDR - Studiou WC Free Photo Product 1.5.9\n"
+"Project-Id-Version: QDR - Studiou WC Free Photo Product 1.5.10\n"
 "Report-Msgid-Bugs-To: https://www.quadarax.com\n"
 "Report-Msgid-Bugs-To: https://www.quadarax.com\n"
 "POT-Creation-Date: 2026-04-02 00:00+0000\n"
 "POT-Creation-Date: 2026-04-02 00:00+0000\n"
 "PO-Revision-Date: 2026-04-02 00:00+0000\n"
 "PO-Revision-Date: 2026-04-02 00:00+0000\n"

+ 1 - 1
studiou-wc-free-photo-product/languages/studiou-wc-free-photo-product.pot

@@ -2,7 +2,7 @@
 # This file is distributed under the GPL v2 or later.
 # This file is distributed under the GPL v2 or later.
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
-"Project-Id-Version: QDR - Studiou WC Free Photo Product 1.5.9\n"
+"Project-Id-Version: QDR - Studiou WC Free Photo Product 1.5.10\n"
 "Report-Msgid-Bugs-To: https://www.quadarax.com\n"
 "Report-Msgid-Bugs-To: https://www.quadarax.com\n"
 "POT-Creation-Date: 2026-04-02 00:00+0000\n"
 "POT-Creation-Date: 2026-04-02 00:00+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

+ 7 - 4
studiou-wc-free-photo-product/studiou-wc-free-photo-product.php

@@ -3,7 +3,7 @@
  * Plugin Name: QDR - Studiou WC Free Photo Product
  * Plugin Name: QDR - Studiou WC Free Photo Product
  * Plugin URI: https://www.quadarax.com/plugins/studiou-wc-free-photo-product
  * Plugin URI: https://www.quadarax.com/plugins/studiou-wc-free-photo-product
  * Description: Allows publishing special WooCommerce products with variants and custom raw image upload for photo printing
  * Description: Allows publishing special WooCommerce products with variants and custom raw image upload for photo printing
- * Version: 1.5.9
+ * Version: 1.5.10
  * Requires at least: 6.9.4
  * Requires at least: 6.9.4
  * Requires PHP: 8.2
  * Requires PHP: 8.2
  * Requires Plugins: woocommerce, product-variant-table-for-woocommerce
  * Requires Plugins: woocommerce, product-variant-table-for-woocommerce
@@ -22,7 +22,7 @@ if (!defined('WPINC')) {
     die;
     die;
 }
 }
 
 
-if (!defined('STUDIOU_WCFPP_VERSION')) define('STUDIOU_WCFPP_VERSION', '1.5.9');
+if (!defined('STUDIOU_WCFPP_VERSION')) define('STUDIOU_WCFPP_VERSION', '1.5.10');
 if (!defined('STUDIOU_WCFPP_PLUGIN_DIR')) define('STUDIOU_WCFPP_PLUGIN_DIR', plugin_dir_path(__FILE__));
 if (!defined('STUDIOU_WCFPP_PLUGIN_DIR')) define('STUDIOU_WCFPP_PLUGIN_DIR', plugin_dir_path(__FILE__));
 if (!defined('STUDIOU_WCFPP_PLUGIN_URL')) define('STUDIOU_WCFPP_PLUGIN_URL', plugin_dir_url(__FILE__));
 if (!defined('STUDIOU_WCFPP_PLUGIN_URL')) define('STUDIOU_WCFPP_PLUGIN_URL', plugin_dir_url(__FILE__));
 if (!defined('STUDIOU_WCFPP_PLUGIN_BASENAME')) define('STUDIOU_WCFPP_PLUGIN_BASENAME', plugin_basename(__FILE__));
 if (!defined('STUDIOU_WCFPP_PLUGIN_BASENAME')) define('STUDIOU_WCFPP_PLUGIN_BASENAME', plugin_basename(__FILE__));
@@ -251,8 +251,11 @@ class Studiou_WC_Free_Photo_Product {
             'chunkSize' => STUDIOU_WCFPP_CHUNK_SIZE,
             'chunkSize' => STUDIOU_WCFPP_CHUNK_SIZE,
             'cartUrl' => wc_get_cart_url(),
             'cartUrl' => wc_get_cart_url(),
             'currency' => array(
             'currency' => array(
-                'symbol'            => function_exists('get_woocommerce_currency_symbol') ? get_woocommerce_currency_symbol() : '',
-                'priceFormat'       => function_exists('get_woocommerce_price_format') ? get_woocommerce_price_format() : '%1$s%2$s',
+                // WooCommerce returns these with HTML entities (&#75;&#269; for Kč, &nbsp;
+                // embedded in priceFormat). Decoded here so the plain-text price formatter
+                // that fills <option> labels renders real characters instead of entities.
+                'symbol'            => function_exists('get_woocommerce_currency_symbol') ? html_entity_decode(get_woocommerce_currency_symbol(), ENT_QUOTES | ENT_HTML5, 'UTF-8') : '',
+                'priceFormat'       => function_exists('get_woocommerce_price_format') ? html_entity_decode(get_woocommerce_price_format(), ENT_QUOTES | ENT_HTML5, 'UTF-8') : '%1$s%2$s',
                 'decimalSeparator'  => function_exists('wc_get_price_decimal_separator') ? wc_get_price_decimal_separator() : '.',
                 'decimalSeparator'  => function_exists('wc_get_price_decimal_separator') ? wc_get_price_decimal_separator() : '.',
                 'thousandSeparator' => function_exists('wc_get_price_thousand_separator') ? wc_get_price_thousand_separator() : ',',
                 'thousandSeparator' => function_exists('wc_get_price_thousand_separator') ? wc_get_price_thousand_separator() : ',',
                 'decimals'          => function_exists('wc_get_price_decimals') ? wc_get_price_decimals() : 2,
                 'decimals'          => function_exists('wc_get_price_decimals') ? wc_get_price_decimals() : 2,