Plugin Directory

Changeset 1388662


Ignore:
Timestamp:
04/06/2016 08:56:31 PM (10 years ago)
Author:
akeda
Message:

Preparing for 1.0.3 release

Location:
woocommerce-accommodation-bookings/trunk
Files:
7 added
5 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-accommodation-bookings/trunk

    • Property svn:ignore
      •  

        old new  
        22Thumbs.db
        33.git
         4deploy-to-wp-org.sh
        45.gitignore
  • woocommerce-accommodation-bookings/trunk/includes/class-wc-accommodation-booking-cart-manager.php

    r1351020 r1388662  
    1616        add_action( 'woocommerce_accommodation-booking_add_to_cart', array( $this, 'add_to_cart' ), 30 );
    1717        add_filter( 'woocommerce_get_item_data', array( $this, 'get_item_data' ), 20, 2 );
     18        add_filter( 'woocommerce_product_addons_adjust_price', array( $this, 'disable_product_add_on_price_adjustment' ), 20, 2 );
    1819    }
    1920
     
    5859    }
    5960
     61    /**
     62     * Don't adjust cart item price for accommodation bookings since the booking form class adds the costs itself
     63     *
     64     * @param boolean $bool should the the addon price be added to the product price.
     65     * @param array   $cart_item the corresponding cart item.
     66     *
     67     * @return bool
     68     */
     69    public function disable_product_add_on_price_adjustment( $bool, $cart_item ) {
     70        if ( $cart_item['data']->is_type( 'accommodation-booking' ) ) {
     71            return false;
     72        }
     73        return $bool;
     74    }
    6075}
    6176
  • woocommerce-accommodation-bookings/trunk/includes/class-wc-product-accommodation-booking.php

    r1351020 r1388662  
    128128        $display_price    = $tax_display_mode == 'incl' ? $this->get_price_including_tax( 1, $this->get_price() ) : $this->get_price_excluding_tax( 1, $this->get_price() );
    129129
     130        if ( $this->wc_booking_min_duration > 1 ) {
     131            $display_price = $display_price / $this->wc_booking_min_duration;
     132        }
     133
    130134        if ( $display_price ) {
    131135            if ( $this->has_additional_costs() ) {
  • woocommerce-accommodation-bookings/trunk/readme.txt

    r1351020 r1388662  
    44Requires at least: 3.8
    55Tested up to: 4.4
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.3
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3131== Changelog ==
    3232
     33= 1.0.3 =
     34* Fix - Per Night Price Displaying Incorrect above bookings form.
     35* Fix - Plugin on WordPress.org does not include assets folder.
     36* Fix - Compatibility with Product Add-ons.
     37
    3338= 1.0.2 =
    3439* Fix - Fatal Error on submit booking request in admin bookings
  • woocommerce-accommodation-bookings/trunk/woocommerce-accommodation-bookings.php

    r1351020 r1388662  
    44Plugin URI: http://www.woothemes.com/products/woocommerce-accommodation-bookings/
    55Description: An accommodations add-on for the WooCommerce Bookings extension.
    6 Version: 1.0.2
     6Version: 1.0.3
    77Author: WooThemes
    88Author URI: http://woothemes.com
Note: See TracChangeset for help on using the changeset viewer.