This topic has 4 replies, 2 voices, and was last updated 6 years, 7 months ago ago by Rose Tyler
Hi,
Can someone help me put the contact form 7 on my product custom tab? I don’t know how to do it.
Thanking in advance. I hope someone can guide me.
add_filter(‘woocommerce_product_tabs’,’wc_product_tabs_contact_form7′,10,1);
function wc_product_tabs_contact_form7($tabs){
$tabs[‘contact-form-7’] = array(
‘title’ => __( ‘Enquiry’, ‘woocommerce’ ),
‘priority’ => 20,
‘callback’ => ‘wc_product_contact_form7_tab’
);
return $tabs;
}
function wc_product_contact_form7_tab(){
echo do_shortcode(‘[contact-form-7 id="7289" title="Capri Gold Contact Form"]‘);
}
I have put that code on my child theme function but its not working… Please help
Its working now.. I manage to fix it by removing white space after the ‘title’.
Hello,
I am glad that you sorted out.
Feel free to ask if you have any other questions.
Regards
You must be logged in to reply to this topic.Log in/Sign up