I was setting up a Mother’s Day promo for a client’s resort website. My plan was to use the YITH WooCommerce Booking Price Rules to make things a little easier. A date-based pricing rule with a 20% discount across most rooms, with a couple of products excluded.
But when I toggled on “Exclude products” in the Price Rules settings, the dropdown just kept spinning. No products loaded. Nothing to select.
What’s Going On
After some digging, I found out the plugin is sending a bad request when it tries to load your booking products into that dropdown. It’s asking WooCommerce for a list of products but with an invalid setting that basically says “show me zero products per page.” WooCommerce doesn’t know what to do with that, so it just fails silently. That’s why the dropdown never loads.
If you open your browser console, you’ll see something like this:

The plugin is sending this request:
GET /wp-json/wc/store/products?type=booking&per_page=0&catalog_visibility=any&search=&orderby=title&order=asc&locale=user
{code: 'rest_invalid_param', message: 'Invalid parameter(s): per_page'}
This happens on both the Price Rules and Availability Rules pages whenever you try to use the “Exclude products” option. I’m on version 5.31.0 of the plugin, so if you’re seeing the same thing, that’s likely what you’re running too.
The Temporary Fix
I submitted a support ticket to YITH and they confirmed this is a known bug. A fix is coming in the next plugin update.
Here’s the snippet they provided. You’ll need to add this to your site using a code snippets plugin (I’ll explain how below):
if ( ! function_exists( 'custom_fix_store_api_per_page' ) ) {
function custom_fix_store_api_per_page( $result, $server, $request ) {
$route = $request->get_route();
if ( strpos( $route, '/wc/store/products' ) !== false ) {
$per_page = $request->get_param( 'per_page' );
if ( ! is_null( $per_page ) && (int) $per_page === 0 ) {
$request->set_param( 'per_page', 100 );
}
}
return $result;
}
add_filter( 'rest_pre_dispatch', 'custom_fix_store_api_per_page', 10, 3 );
}
In plain terms, this snippet catches that bad request before it goes through and fixes the number so WooCommerce can actually return your products. Once it’s active, the dropdown loads and you can select the products you want to exclude. That’s it.
Once YITH releases the updated plugin version with the official fix, you can safely remove this snippet.
How to Add the Snippet
The easiest way is to use a free plugin called FluentSnippets. Install it from your WordPress dashboard, create a new snippet, paste the code above, and activate it. This keeps things clean and a theme update won’t wipe it out.
If you’re not sure how to do this, your web developer can add it for you in a couple of minutes. It’s a quick one.
Shoutout to YITH Support
I have to say, I was really impressed with how fast they got back to me. I submitted the ticket and they acknowledged the issue and provided a workaround right away. No back and forth. Just a quick confirmation and a working solution. That kind of support makes a big difference, especially when you’re in the middle of setting something up for a client.
Quick Recap
The “Exclude products” spinner issue in YITH Booking is caused by a small bug in how the plugin requests your product list. YITH has acknowledged it and a permanent fix is on the way. Until then, the snippet above gets you back on track.
If you’re using YITH Booking & Appointments for a vacation rental or resort site, this is one of those small things that can hold you up when you’re trying to get something done. Glad the YITH team was quick on it.






