Hi @markelchroma,
Would it be ok for you to add a small PHP snippet to achieve what we need? If that’s ok, then you would need to limit tag to 4 (as we discussed before), and then add this code to your (child) theme’s functions.php file (this will additionally set any product’s max limit to 1):
add_filter( 'alg_wc_mppu_check_quantities_for_product', 'my_custom_alg_wc_mppu_check_quantities_for_product', 10, 3 );
if ( ! function_exists( 'my_custom_alg_wc_mppu_check_quantities_for_product' ) ) {
function my_custom_alg_wc_mppu_check_quantities_for_product( $is_valid, $core, $args ) {
if ( $is_valid ) {
$max_qty = 1;
$user_already_bought = $core->get_user_already_bought_qty( $args['product_id'], $args['current_user_id'], true );
if ( ( $user_already_bought + $args['cart_item_quantity'] ) > $max_qty ) {
if ( $args['do_add_notices'] ) {
$core->output_notice( $args['product_id'], $max_qty, $user_already_bought, $args['is_cart'] );
}
return false;
}
}
return $is_valid;
}
}
Please let me know what you think.