Changeset 3445028
- Timestamp:
- 01/22/2026 04:57:35 PM (2 months ago)
- Location:
- tourfic/trunk
- Files:
-
- 5 edited
-
appsero.json (modified) (1 diff)
-
inc/Classes/Apartment/Apartment.php (modified) (8 diffs)
-
inc/Traits/Action_Helper.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
tourfic.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tourfic/trunk/appsero.json
r3440952 r3445028 6 6 "composer.lock", 7 7 ".gitignore", 8 "action-hook.md", 8 9 "webpack-config.js", 9 10 "package-lock.json", -
tourfic/trunk/inc/Classes/Apartment/Apartment.php
r3426807 r3445028 1746 1746 $('.tf-apartment-price-list').show(); 1747 1747 $('.total-days-price-wrap').show(); 1748 total_days_price_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', total_price.toFixed(2));1748 total_days_price_html = wcFormatPrice(total_price); 1749 1749 } 1750 1750 $('.total-days-price-wrap .total-days').html(wc_price_per_night + ' x ' + days + ' <?php esc_html_e( 'nights', 'tourfic' ); ?>'); … … 1754 1754 var total_price = totalPersonPrice * days; 1755 1755 var total_days_price_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'; 1756 var wc_price_per_person = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', totalPersonPrice.toFixed(2));1756 var wc_price_per_person = wcFormatPrice(totalPersonPrice); 1757 1757 if (total_price > 0) { 1758 1758 $('.tf-apartment-price-list').show(); 1759 1759 $('.total-days-price-wrap').show(); 1760 total_days_price_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', total_price.toFixed(2));1760 total_days_price_html = wcFormatPrice(total_price); 1761 1761 } 1762 1762 $('.total-days-price-wrap .total-days').html(wc_price_per_person + ' x ' + days + ' <?php esc_html_e( 'nights', 'tourfic' ); ?>'); … … 1792 1792 $('.tf-apartment-price-list').show(); 1793 1793 $('.total-days-price-wrap').show(); 1794 total_price_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', total_price.toFixed(2));1794 total_price_html = wcFormatPrice(total_price); 1795 1795 } 1796 1796 $('.total-days-price-wrap .total-days').html(days + ' <?php esc_html_e( 'nights', 'tourfic' ); ?>'); … … 1805 1805 1806 1806 <?php if ( $discount_type == 'percent' ): ?> 1807 discount_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', (total_price * discount / 100).toFixed(2));1807 discount_html = wcFormatPrice(total_price * discount / 100); 1808 1808 total_price = total_price - (total_price * discount / 100); 1809 1809 <?php else: ?> 1810 discount_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', discount.toFixed(2));1810 discount_html = wcFormatPrice(discount); 1811 1811 total_price = total_price - discount; 1812 1812 <?php endif; ?> … … 1835 1835 $('.additional-fee-wrap').show(); 1836 1836 total_price = total_price + totalAdditionalFee_<?php echo esc_html( $key ) ?>; 1837 additional_fee_html_<?php echo esc_html( $key ) ?> = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', totalAdditionalFee_<?php echo esc_html( $key ) ?>.toFixed(2));1837 additional_fee_html_<?php echo esc_html( $key ) ?> = wcFormatPrice(totalAdditionalFee_<?php echo esc_html( $key ) ?>); 1838 1838 } 1839 1839 $('.additional-fee-wrap .additional-fee-<?php echo esc_html( $key ) ?>').html(additional_fee_html_<?php echo esc_html( $key ) ?>); … … 1856 1856 $('.additional-fee-wrap').show(); 1857 1857 total_price = total_price + totalAdditionalFee; 1858 additional_fee_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', totalAdditionalFee.toFixed(2));1858 additional_fee_html = wcFormatPrice(totalAdditionalFee); 1859 1859 } 1860 1860 $('.additional-fee-wrap .additional-fee').html(additional_fee_html); … … 1867 1867 if (total_price > 0) { 1868 1868 $('.total-price-wrap').show(); 1869 total_price_html = '<?php echo wp_kses_post(wc_price( 0 )); ; ?>'.replace('0.00', total_price.toFixed(2));1869 total_price_html = wcFormatPrice(total_price); 1870 1870 } 1871 1871 $('.total-price-wrap .total-price').html(total_price_html); … … 1897 1897 } 1898 1898 } 1899 1900 function wcFormatPrice( price ) { 1901 1902 var currency_symbol = "<?php echo esc_js(get_woocommerce_currency_symbol()); ?>", 1903 currency_position = "<?php echo esc_js(get_option( 'woocommerce_currency_pos', true )); ?>", 1904 decimal_separator = "<?php echo esc_js(wc_get_price_decimal_separator()); ?>", 1905 thousand_separator = "<?php echo esc_js(wc_get_price_thousand_separator()); ?>", 1906 decimals = <?php echo (int) wc_get_price_decimals(); ?>; 1907 1908 price = parseFloat(price).toFixed(decimals); 1909 1910 // Thousand & decimal formatting 1911 price = price.replace('.', decimal_separator); 1912 price = price.replace(/\B(?=(\d{3})+(?!\d))/g, thousand_separator); 1913 1914 switch ( currency_position ) { 1915 case 'left': 1916 return currency_symbol + price; 1917 case 'right': 1918 return price + currency_symbol; 1919 case 'left_space': 1920 return currency_symbol + ' ' + price; 1921 case 'right_space': 1922 return price + ' ' + currency_symbol; 1923 default: 1924 return price; 1925 } 1926 } 1899 1927 1900 1928 $(".tf-apartment-design-one-form #check-in-date").on('click', function () { -
tourfic/trunk/inc/Traits/Action_Helper.php
r3438400 r3445028 71 71 */ 72 72 function tf_ask_question_modal() { 73 74 // Allowed post types 75 $allowed_post_types = array( 'tf_hotel', 'tf_tours', 'tf_apartment', 'tf_carrental' ); 76 77 // Ensure we're on a singular page and correct post type 78 if ( ! is_singular( $allowed_post_types ) && ! is_post_type_archive( $allowed_post_types ) ) { 79 return; 80 } 73 81 ?> 74 82 <div class="tf-modal tf-modal-extra-small" id="tf-ask-modal"> -
tourfic/trunk/readme.txt
r3440952 r3445028 4 4 Requires at least: 5.4 5 5 Tested up to: 6.9 6 Stable tag: 2.20. 26 Stable tag: 2.20.3 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 413 413 == Changelog == 414 414 415 = 2.20.3 – January 22, 2026 = 416 417 - Fixed: Issue with enquiry modal display. 418 - Fixed: Tour itinerary map not rendering correctly. 419 - Fixed: Incorrect apartment pricing issue. 420 415 421 = 2.20.2 – January 16, 2026 = 416 422 … … 440 446 - Fixed: Enquiry disable option issue. 441 447 442 = 2.18.11 – December 24, 2025 =443 444 - Tweak: Tour pricing behavior445 - Tweak: Migrator functionality446 - Tweak: Tour and apartment search handling447 448 448 **Old Changelog can be found [here](https://community.themefic.com/changelog/)**. 449 449 -
tourfic/trunk/tourfic.php
r3440952 r3445028 8 8 * Text Domain: tourfic 9 9 * Domain Path: /lang/ 10 * Version: 2.20. 210 * Version: 2.20.3 11 11 * Tested up to: 6.9 12 12 * WC tested up to: 10.4 … … 28 28 */ 29 29 30 const VERSION = '2.20. 2';30 const VERSION = '2.20.3'; 31 31 32 32 /**
Note: See TracChangeset
for help on using the changeset viewer.