From 8c793c244f413bfbc7939813b36aedea7703d4b3 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 12 Apr 2016 12:55:40 -0400 Subject: [PATCH] Product tabs inquiry form --- functions.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/functions.php b/functions.php index 9541411..3029213 100644 --- a/functions.php +++ b/functions.php @@ -75,6 +75,21 @@ function glm_site_scripts() } +// This function is to always have the WooCommerce custom tab from the +// "Woocommerc Custom Product Tabs Lite" always display the product inquiry form +function sv_change_custom_tab_content( $content ) { + $content = '[gravityform id="2" title="true" description="true"]'; + return $content; +} +add_filter( 'woocommerce_custom_product_tabs_lite_content', 'sv_change_custom_tab_content' ); +// This function is to always have the WooCommerce custom tab from the +// "Woocommerc Custom Product Tabs Lite" always have the title "Product Inquiry" +function sv_change_custom_tab_title( $title ) { + $title = 'Product Inquiry'; + return $title; +} +add_filter( 'woocommerce_custom_product_tabs_lite_title', 'sv_change_custom_tab_title' ); +// if needed, tab order may perhaps be changeable with $tabs['my-custom-product']['priority'] = 5; or something equivalent /* Header for posts*/ function glm_get_header() { -- 2.17.1