Changeset 3484337
- Timestamp:
- 03/16/2026 11:48:08 PM (13 days ago)
- Location:
- understory
- Files:
-
- 10 edited
- 1 copied
-
tags/1.8.4 (copied) (copied from understory/trunk)
-
tags/1.8.4/CLAUDE.md (modified) (1 diff)
-
tags/1.8.4/includes/utils/class-experiences.php (modified) (1 diff)
-
tags/1.8.4/package-lock.json (modified) (2 diffs)
-
tags/1.8.4/readme.txt (modified) (2 diffs)
-
tags/1.8.4/understory.php (modified) (2 diffs)
-
trunk/CLAUDE.md (modified) (1 diff)
-
trunk/includes/utils/class-experiences.php (modified) (1 diff)
-
trunk/package-lock.json (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/understory.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
understory/tags/1.8.4/CLAUDE.md
r3471141 r3484337 207 207 ### Version Management 208 208 209 Current version: 1.8. 3(defined in both `package.json` and `understory.php`)209 Current version: 1.8.4 (defined in both `package.json` and `understory.php`) -
understory/tags/1.8.4/includes/utils/class-experiences.php
r3471141 r3484337 131 131 */ 132 132 private static function format_price( $amount, $currency, $language ) { 133 $locale = self::language_to_locale( $language ); 134 $currency = strtoupper( $currency ); 135 $formatter = new \NumberFormatter( $locale, \NumberFormatter::CURRENCY ); 136 $formatter->setAttribute( \NumberFormatter::FRACTION_DIGITS, 0 ); 137 $formatted = $formatter->formatCurrency( (float) $amount, $currency ); 138 if ( false !== $formatted ) { 139 return $formatted; 133 $locale = self::language_to_locale( $language ); 134 $currency = strtoupper( $currency ); 135 136 if ( class_exists( '\NumberFormatter' ) ) { 137 $formatter = new \NumberFormatter( $locale, \NumberFormatter::CURRENCY ); 138 $formatter->setAttribute( \NumberFormatter::FRACTION_DIGITS, 0 ); 139 $formatted = $formatter->formatCurrency( (float) $amount, $currency ); 140 if ( false !== $formatted ) { 141 return $formatted; 142 } 140 143 } 141 144 142 return $currency . $amount; 145 // Fallback: use a simple symbol map if NumberFormatter is unavailable 146 $symbols = array( 147 'EUR' => '€', 148 'USD' => '$', 149 'GBP' => '£', 150 'DKK' => 'kr', 151 'SEK' => 'kr', 152 'NOK' => 'kr', 153 'CHF' => 'CHF', 154 ); 155 $symbol = $symbols[ $currency ] ?? $currency; 156 return $symbol . $amount; 143 157 } 144 158 -
understory/tags/1.8.4/package-lock.json
r3470118 r3484337 1 1 { 2 2 "name": "understory", 3 "version": "1.8. 2",3 "version": "1.8.4", 4 4 "lockfileVersion": 3, 5 5 "requires": true, … … 7 7 "": { 8 8 "name": "understory", 9 "version": "1.8. 2",9 "version": "1.8.4", 10 10 "dependencies": { 11 11 "@mui/material": "6.4.2", -
understory/tags/1.8.4/readme.txt
r3471141 r3484337 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 1.8. 36 Stable tag: 1.8.4 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 77 77 78 78 == Changelog == 79 80 = 1.8.4 = 81 * Experiences widget: Fix a fatal error on servers without the PHP intl extension by adding a fallback for currency formatting. 79 82 80 83 = 1.8.3 = -
understory/tags/1.8.4/understory.php
r3471141 r3484337 3 3 Plugin Name: Understory 4 4 Description: Connect your WordPress site with Understory, to easily add your booking widget to posts and pages. 5 Version: 1.8. 35 Version: 1.8.4 6 6 Author: Understory 7 7 Text Domain: understory … … 18 18 define('UNDERSTORY_PLUGIN_URL', plugin_dir_url(__FILE__)); 19 19 define('UNDERSTORY_PLUGIN_SLUG', 'understory'); 20 define('UNDERSTORY_PLUGIN_VERSION', '1.8. 3');20 define('UNDERSTORY_PLUGIN_VERSION', '1.8.4'); 21 21 define('UNDERSTORY_OPTION_KEY', 'understory_options'); 22 22 define('UNDERSTORY_NONCE_KEY', 'understory_nonce'); -
understory/trunk/CLAUDE.md
r3471141 r3484337 207 207 ### Version Management 208 208 209 Current version: 1.8. 3(defined in both `package.json` and `understory.php`)209 Current version: 1.8.4 (defined in both `package.json` and `understory.php`) -
understory/trunk/includes/utils/class-experiences.php
r3471141 r3484337 131 131 */ 132 132 private static function format_price( $amount, $currency, $language ) { 133 $locale = self::language_to_locale( $language ); 134 $currency = strtoupper( $currency ); 135 $formatter = new \NumberFormatter( $locale, \NumberFormatter::CURRENCY ); 136 $formatter->setAttribute( \NumberFormatter::FRACTION_DIGITS, 0 ); 137 $formatted = $formatter->formatCurrency( (float) $amount, $currency ); 138 if ( false !== $formatted ) { 139 return $formatted; 133 $locale = self::language_to_locale( $language ); 134 $currency = strtoupper( $currency ); 135 136 if ( class_exists( '\NumberFormatter' ) ) { 137 $formatter = new \NumberFormatter( $locale, \NumberFormatter::CURRENCY ); 138 $formatter->setAttribute( \NumberFormatter::FRACTION_DIGITS, 0 ); 139 $formatted = $formatter->formatCurrency( (float) $amount, $currency ); 140 if ( false !== $formatted ) { 141 return $formatted; 142 } 140 143 } 141 144 142 return $currency . $amount; 145 // Fallback: use a simple symbol map if NumberFormatter is unavailable 146 $symbols = array( 147 'EUR' => '€', 148 'USD' => '$', 149 'GBP' => '£', 150 'DKK' => 'kr', 151 'SEK' => 'kr', 152 'NOK' => 'kr', 153 'CHF' => 'CHF', 154 ); 155 $symbol = $symbols[ $currency ] ?? $currency; 156 return $symbol . $amount; 143 157 } 144 158 -
understory/trunk/package-lock.json
r3470118 r3484337 1 1 { 2 2 "name": "understory", 3 "version": "1.8. 2",3 "version": "1.8.4", 4 4 "lockfileVersion": 3, 5 5 "requires": true, … … 7 7 "": { 8 8 "name": "understory", 9 "version": "1.8. 2",9 "version": "1.8.4", 10 10 "dependencies": { 11 11 "@mui/material": "6.4.2", -
understory/trunk/readme.txt
r3471141 r3484337 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 1.8. 36 Stable tag: 1.8.4 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 77 77 78 78 == Changelog == 79 80 = 1.8.4 = 81 * Experiences widget: Fix a fatal error on servers without the PHP intl extension by adding a fallback for currency formatting. 79 82 80 83 = 1.8.3 = -
understory/trunk/understory.php
r3471141 r3484337 3 3 Plugin Name: Understory 4 4 Description: Connect your WordPress site with Understory, to easily add your booking widget to posts and pages. 5 Version: 1.8. 35 Version: 1.8.4 6 6 Author: Understory 7 7 Text Domain: understory … … 18 18 define('UNDERSTORY_PLUGIN_URL', plugin_dir_url(__FILE__)); 19 19 define('UNDERSTORY_PLUGIN_SLUG', 'understory'); 20 define('UNDERSTORY_PLUGIN_VERSION', '1.8. 3');20 define('UNDERSTORY_PLUGIN_VERSION', '1.8.4'); 21 21 define('UNDERSTORY_OPTION_KEY', 'understory_options'); 22 22 define('UNDERSTORY_NONCE_KEY', 'understory_nonce');
Note: See TracChangeset
for help on using the changeset viewer.