We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eba7a80 commit 363f670Copy full SHA for 363f670
resolver/store/cart.php
@@ -13,7 +13,9 @@ public function add($args) {
13
$options[ $option['id'] ] = $option['value'];
14
}
15
$variation_id = $this->find_matching_product_variation_id($args['id'], $options);
16
-
+ if(!$variation_id) {
17
+ throw new \Exception('Please select an option.');
18
+ }
19
WC()->cart->add_to_cart($args['id'], $args['quantity'], $variation_id);
20
} else {
21
WC()->cart->add_to_cart($args['id'], $args['quantity']);
0 commit comments