Plugin Directory

Changeset 1963250


Ignore:
Timestamp:
10/26/2018 03:51:56 AM (7 years ago)
Author:
leehld
Message:

Update version 1.8.1 - Update compatible with WPML 4.0.7

Location:
wp-hotel-booking-wpml-support
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-hotel-booking-wpml-support/trunk/inc/class-hbwp-support.php

    r1894888 r1963250  
    120120
    121121            add_filter( 'woocommerce_cart_item_name', array( $this, 'woo_cart_item_name' ), 10, 3 );
     122
     123            add_filter( 'hotel_booking_query_search_parser', array( $this, 'query_search_parser' ), 10, 2 );
     124        }
     125
     126        /**
     127         * @param $room
     128         * @param $args
     129         *
     130         * @return bool
     131         */
     132        public function query_search_parser( $room, $args ) {
     133            $cap_id = get_post_meta( $room->ID, '_hb_room_origin_capacity', true );
     134
     135            if ( $cap_id ) {
     136                $qty = get_term_meta( $cap_id, 'hb_max_number_of_adults', true );
     137                if ( $qty < $args['adults'] ) {
     138                    return false;
     139                }
     140            }
     141
     142            return $room;
    122143        }
    123144
     
    261282         */
    262283        public function checkout_wpml_lang_field() { ?>
    263             <input type="hidden" name="wpml_language" value="<?php echo $this->current_language_code; ?>">
     284            <input type="hidden" name="wpml_language" value="<?php echo $this->current_language_code; ?>">
    264285        <?php }
    265286
  • wp-hotel-booking-wpml-support/trunk/readme.txt

    r1894888 r1963250  
    44Tags: hotel, booking, hotel booking, reservation, reservations, wpml
    55Requires at least: 4.2
    6 Tested up to: 4.9.6
     6Tested up to: 4.9.8
    77Stable tag: trunk
    88License: GPLv2 or later
     
    5959== Changelog ==
    6060
     61= 1.8.1 =
     62+ Update compatible with WPML 4.0.7
     63
    6164= 1.8 =
    6265+ Update compatible with WPML 4.0.2
  • wp-hotel-booking-wpml-support/trunk/wp-hotel-booking-wpml-support.php

    r1894888 r1963250  
    55  Description: Multi language CMS support
    66  Author: ThimPress
    7   Version: 1.8.0
     7  Version: 1.8.1
    88  Author URI: http://thimpress.com
    99  Tags: wphb
     
    1212define( 'HOTELBOOKING_WMPL_DIR', plugin_dir_path( __FILE__ ) );
    1313define( 'HOTELBOOKING_WMPL_URI', plugins_url( '', __FILE__ ) );
    14 define( 'HOTELBOOKING_WMPL_VER', '1.8.0' );
     14define( 'HOTELBOOKING_WMPL_VER', '1.8.1' );
    1515
    1616if ( ! class_exists( 'WP_Hotel_Booking_Wpml_Support' ) ) {
Note: See TracChangeset for help on using the changeset viewer.