Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL SiR-DanieL/functions.php
Last active Nov 14, 2017

Embed
What would you like to do?
add_filter( 'woocommerce_product_tabs', 'woo_edit_tabs' );
function woo_edit_tabs( $tabs ) {
// Adds the new tab
$tabs['enquiry_form'] = array(
'title' => __( 'Ask a question', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_enquiry_form'
);
return $tabs;
}
function woo_enquiry_form() {
echo '<h2>' . __( 'Do you have a question?', 'woocommerce' ) . '</h2>';
echo '<p>' . __( 'Drop us a line by compiling the form below. We will be more than happy to reply to any of your questions!', 'woocommerce' ) . '</p>';
echo do_shortcode( '[your_form_shortcode_here]' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.