ACHETEZ LIBRE D'IMPÔT

Tous nos prix HORS TAXE

Commencez à taper pour voir les produits que vous recherchez.
add_filter('woocommerce_add_to_cart_validation', 'limit_quantity_to_stock', 10, 3); function limit_quantity_to_stock($passed, $product_id, $quantity) { $product = wc_get_product($product_id); $stock = $product->get_stock_quantity(); if ($product->managing_stock() && !$product->is_on_backorder() && $quantity > $stock) { wc_add_notice(__('La quantité demandée dépasse le stock disponible.', 'woocommerce'), 'error'); return false; } return $passed; }
Shop
Wishlist
0 items Cart
Mon compte
Ouvrir Chat
Besoin d'aide ?
Bonjour 👋
Comment puis-je vous aider ?