Trying to add the SKU
authorLaury GvR <laury@gaslightmedia.com>
Tue, 19 Apr 2016 19:30:09 +0000 (15:30 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 19 Apr 2016 19:30:09 +0000 (15:30 -0400)
functions.php

index e64c261..298dae9 100644 (file)
@@ -91,7 +91,8 @@ function woo_product_inquiry_tab( $tabs ) {
 
 }
 function woo_product_inquiry_content() {
-    echo do_shortcode('[gravityform id="2" title="true" description="true"]');
+    global $product;
+    echo do_shortcode('[gravityform id="2" title="true" description="true" values="product_sku='.$product->get_sku().'"]');
 }
 add_filter( 'gform_field_value_product_name', 'gform_add_product_name_field' );
 function gform_add_product_name_field( $value ) {