We try to keep Reserved Stock Pro as compatible with third-party plugins as possible. However, there are certain incompatibilities you should be aware of.
We want to keep this list active, so if you come across any other plugins, please let us know.
Compatible & Recommended Plugins
There are recommended products that work better with Reserved Stock Pro. We’ll keep track of them here.
- WPML – WPML is now compatible with our add-on ๐
- Product Bundles for WooCommerce – Now compatible built-in support ๐
- Advanced Product Fields by Studio Wombat- Now compatible built-in support ๐
- Fast Cart by Barn2 – See setup tips ๐
- ย WooCommerce Cart Abandoned By WP Funnels๐
Incompatible Plugins
Reserved Stock Pro will skip products that are using third-party product types. Though there are cases where some plugins try to modify existing product types in ways that doesn’t match the WooCommerce Core. Our list provides you a quick indication of which plugins/products will not be reserved in the WooCommerce cart.
Note: Some cart plugins can lead to incorrect reservation quantities and unexpected behavior if they do not handle validation correctly. See below code example.
- WPC Grouped Product for WooCommerce – modifies the cart item object structure.
- Mix & Match Products for WooCommerce – modifies the cart item object structure.
- YITH WooCommerce Product Bundles – We recommend you use the official WooCommerce plugin instead.
- Side Cart by Xootix – Validation when changing cart quantities not handled correctly.
- FooEvents – Event tickets seats/product type/stock are not handled by RSP.
- WooEvents – Event tickets are not handled by RSP.
Themes
Item is not removed from cart without reloading
We’ve been investing in this issue and it seems that some third-party themes do not add create their custom carts with WooCommerce fragments in mind. Fragments are used to update the cart via AJAX (without reloading the page). Reserved Stock Pro will trigger the following JavaScript event once the countdown has finished.
jQuery( document.body ).trigger( 'wc_fragment_refresh');
jQuery( document.body ).trigger( 'wc_update_cart');
jQuery( document.body ).trigger( 'update_checkout');
jQuery( document.body ).trigger( 'updated_wc_div');
Code language: JavaScript (javascript)
These events will normally trigger the cart/checkout to refresh using AJAX and grab the new cart content (using fragments). It’s necessary that your theme uses cart fragments for the cart, mini-cart or slide-out cart to be refreshed using these events. Otherwise, the customer will continue to see their old cart contents after their reservations have expired. Customers would only know the products have been removed when they reload the page or load another page.
Is your theme not working with WooCommerce cart fragments? Send your theme developer the official fragment code example and core from WooCommerce.
Setting Cart Stock Programmatically
We often come across third-party carts that create issues with products and stock.
These issues can occur when plugins don’t validate updates to the WooCommerce cart correctly on the server side.
This can apply to:
- Plugins with side carts or popup carts.
- Themes that have custom carts.
- Custom code.
Below you’ll find our example code for correctly validating stock changes in the WooCommerce cart using the official WooCommerce action hooks.
This snippet is made for WooCommerce 6.2+ and is fully compatible with Reserved Stock Pro.
$passed_validation = apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $cart_item, $new_quantity );
if ( $passed_validation ) {
$updated = WC()->cart->set_quantity( $cart_item_key, $new_quantity );
$updated = apply_filters( 'woocommerce_update_cart_action_cart_updated', $updated );
if ($updated) {
// stock in cart was updated.
} else {
// stock didn't update.
}
}
Code language: PHP (php)
Frequently asked questions
Why doesn’t Reserved Stock Pro work with Product Bundles?
If you take a look at the Product Bundles plugin, you’ll notice that it creates a new product that “bundles” other products. Basically, the plugin creates a new data structure for tracking changes to the cart. These changes do not match the expected data of simple/variable products that Reserved Stock Pro uses.
The official WooCommerce Product Bundles plugin is now fully compatible with Reserved Stock Pro.
Does RSP work with WPML products?
WPML is a plugin that allows you to create translations of WordPress content into different languages.
WPML works by creating duplicates of each WooCommerce product (a product duplicate is assigned its own product ID, so it’s not the same as the original).
Setting up Reserved Stock Pro with WPML
Reserved Stock Pro sees each product ID as a unique product and therefore the reservations do not match across translations. You will need our add-on plugin to use Reserved Stock Pro will WPML. The add-on will detect if the current product is a translation and make sure the original product ID is reserved instead.
Get the Reserved Stock Pro | Add-on – WPML