Created
October 4, 2016 14:29
-
-
Save MinaPansuriya/9812405af50e46d8ae95680571d190ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Title: Add Product Inquiry tab to WooCommerce Single Product Page | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'pbs_woo_add_product_inquiry_tab', 98 ); | |
function pbs_woo_add_product_inquiry_tab( $tabs ) { | |
$tabs['pbs_inquiry_tab']['callback'] = 'pbs_woo_custom_desc_tab_content'; // Callback function for description tab | |
$tabs['pbs_inquiry_tab']['title'] = 'Product Inquiry'; | |
$tabs['pbs_inquiry_tab']['priority'] = 40; | |
return $tabs; | |
} | |
function pbs_woo_custom_desc_tab_content() { | |
echo '<h2>Product Inquiry</h2>'; | |
echo '<p>Please fill below form to send product inquiry</p>'; | |
// Note: Change below shortcode with your Contact Form 7 Shortcode | |
echo do_shortcode('[contact-form-7 id="3" title="Contact form 1"]'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment