Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Change:

    $product_id = $product['product_id'];

    to:

    $product_id = ! empty( $product['variation_id'] ) ? $product['variation_id'] : $product['product_id'];
    Thread Starter jordanwebdev

    (@jordanwebdev)

    Thanks! Worked like a charm. For anyone looking, the spot Mike refers to in the code is here:

    // Loop through cart products
      foreach( $products as $product ) {
    
    	  // Get product ID and '_virtual' post meta ----the code goes under here---
          $product_id = ! empty( $product['variation_id'] ) ? $product['variation_id'] : $product['product_id'];
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide checkout fields for variable product’ is closed to new replies.