Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dougaitken/67a43fc1242686397b8c22689208c721 to your computer and use it in GitHub Desktop.
Save dougaitken/67a43fc1242686397b8c22689208c721 to your computer and use it in GitHub Desktop.
In version 1.1.2 of Accommodation Bookings and 1.15.6 of Bookings, a change was made that affects how Rates are applied for Accommodation Bookings products. Using filter reverts that.
/**
* Add the old Accommodation Bookings logic where more than one Rate can be applied to Accommodation Bookings blocks
* Reverts https://github.com/woocommerce/woocommerce-accommodation-bookings/pull/234
*/
add_filter( 'woocommerce_bookings_apply_multiple_rules_per_block', '__return_true' );
@dougaitken
Copy link
Author

For example, you could have a range of dates for increasing the prices for "Peak" season but also have a Friday & Saturday rate all year.

By default - only one Rate is applied
But if you want to have two Rates applied, this filter should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment