Plugin Contributor
David G
(@gravid7)
Hi @bjornroiverhogen,
Thank you for reaching out.
Could you please share some screenshots of your configuration settings? This will help us replicate the issue on our end and assist you more effectively in resolving it.
Hi @gravid7 ,
Any news on this?
Plugin Contributor
David G
(@gravid7)
Hi
We’ve logged this as a confirmed bug and will include the official fix in the upcoming Booster update.
In the meantime, if you’d like to apply the patch manually to prevent the crash right away, please follow the steps below:
File path (depending on your installed booster version):
If you are using booster elite version
/wp-content/plugins/booster-elite-for-woocommerce/includes/class-wcj-order-quantities.php
If you are using booster plus version
/wp-content/plugins/booster-plus-for-woocommerce/includes/class-wcj-order-quantities.php
If you are using booster free version
/wp-content/plugins/woocommerce-jetpack/includes/class-wcj-order-quantities.php
Locate this function: "set_quantity_input_max"
Note : Before making any changes, please back up the original file to avoid any potential issues.
Replace it with the following code:
public function set_quantity_input_max( $qty, $_product ) {
// Prevent recursion to avoid memory exhaustion
static $depth = 0;
if ( $depth > 0 ) {
return $qty;
}
$depth++;
// Handle variable products normally
if ( $_product->is_type( 'variable' ) ) {
$depth--;
return $qty;
}
// Apply Booster max logic
$plugin_max = $this->get_product_quantity( 'max', $_product, $qty );
$wc_max = $_product->get_max_purchase_quantity();
$depth--;
// Return the correct limit
return ( -1 === $wc_max || $plugin_max < $wc_max ) ? $plugin_max : $wc_max;
}
This fix will be officially included in our upcoming update so that no manual patch will be required going forward.