Plugin Directory

Changeset 3445028


Ignore:
Timestamp:
01/22/2026 04:57:35 PM (2 months ago)
Author:
themefic
Message:

2.20.3

Location:
tourfic/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tourfic/trunk/appsero.json

    r3440952 r3445028  
    66        "composer.lock",
    77        ".gitignore",
     8        "action-hook.md",
    89        "webpack-config.js",
    910        "package-lock.json",
  • tourfic/trunk/inc/Classes/Apartment/Apartment.php

    r3426807 r3445028  
    17461746                                            $('.tf-apartment-price-list').show();
    17471747                                            $('.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);
    17491749                                        }
    17501750                                        $('.total-days-price-wrap .total-days').html(wc_price_per_night + ' x ' + days + ' <?php esc_html_e( 'nights', 'tourfic' ); ?>');
     
    17541754                                        var total_price = totalPersonPrice * days;
    17551755                                        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);
    17571757                                        if (total_price > 0) {
    17581758                                            $('.tf-apartment-price-list').show();
    17591759                                            $('.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);
    17611761                                        }
    17621762                                        $('.total-days-price-wrap .total-days').html(wc_price_per_person + ' x ' + days + ' <?php esc_html_e( 'nights', 'tourfic' ); ?>');
     
    17921792                                        $('.tf-apartment-price-list').show();
    17931793                                        $('.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);
    17951795                                    }
    17961796                                    $('.total-days-price-wrap .total-days').html(days + ' <?php esc_html_e( 'nights', 'tourfic' ); ?>');
     
    18051805
    18061806                                    <?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);
    18081808                                    total_price = total_price - (total_price * discount / 100);
    18091809                                    <?php else: ?>
    1810                                     discount_html = '<?php echo wp_kses_post(wc_price( 0 ));    ; ?>'.replace('0.00', discount.toFixed(2));
     1810                                    discount_html = wcFormatPrice(discount);
    18111811                                    total_price = total_price - discount;
    18121812                                    <?php endif; ?>
     
    18351835                                    $('.additional-fee-wrap').show();
    18361836                                    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 ) ?>);
    18381838                                }
    18391839                                $('.additional-fee-wrap .additional-fee-<?php echo esc_html( $key ) ?>').html(additional_fee_html_<?php echo esc_html( $key ) ?>);
     
    18561856                                    $('.additional-fee-wrap').show();
    18571857                                    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);
    18591859                                }
    18601860                                $('.additional-fee-wrap .additional-fee').html(additional_fee_html);
     
    18671867                                if (total_price > 0) {
    18681868                                    $('.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);
    18701870                                }
    18711871                                $('.total-price-wrap .total-price').html(total_price_html);
     
    18971897                        }
    18981898                    }
     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                    }
    18991927
    19001928                    $(".tf-apartment-design-one-form #check-in-date").on('click', function () {
  • tourfic/trunk/inc/Traits/Action_Helper.php

    r3438400 r3445028  
    7171     */
    7272    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        }
    7381        ?>
    7482        <div class="tf-modal tf-modal-extra-small" id="tf-ask-modal">
  • tourfic/trunk/readme.txt

    r3440952 r3445028  
    44Requires at least: 5.4
    55Tested up to: 6.9
    6 Stable tag: 2.20.2
     6Stable tag: 2.20.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    413413== Changelog ==
    414414
     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
    415421= 2.20.2 – January 16, 2026 =
    416422
     
    440446- Fixed: Enquiry disable option issue.
    441447
    442 = 2.18.11 – December 24, 2025 =
    443 
    444 - Tweak: Tour pricing behavior
    445 - Tweak: Migrator functionality
    446 - Tweak: Tour and apartment search handling
    447 
    448448**Old Changelog can be found [here](https://community.themefic.com/changelog/)**.
    449449
  • tourfic/trunk/tourfic.php

    r3440952 r3445028  
    88 * Text Domain:     tourfic
    99 * Domain Path:     /lang/
    10  * Version:         2.20.2
     10 * Version:         2.20.3
    1111 * Tested up to:    6.9
    1212 * WC tested up to: 10.4
     
    2828     */
    2929
    30     const VERSION = '2.20.2';
     30    const VERSION = '2.20.3';
    3131
    3232    /**
Note: See TracChangeset for help on using the changeset viewer.