Fixed missing product id
This commit is contained in:
parent
513e207e75
commit
a3eabe1c0f
|
@ -3,7 +3,7 @@
|
|||
* Variable Product Add to Cart
|
||||
*/
|
||||
|
||||
global $woocommerce, $product;
|
||||
global $woocommerce, $product, $post;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var product_variations = <?php echo json_encode($available_variations) ?>;
|
||||
|
|
|
@ -265,7 +265,6 @@ function woocommerce_add_to_cart_action( $url = false ) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if ($all_variations_set) {
|
||||
// Add to cart validation
|
||||
$passed_validation = apply_filters('woocommerce_add_to_cart_validation', true, $product_id, $quantity);
|
||||
|
|
Loading…
Reference in New Issue