Product Custom Tab - by Capri - on WordPress WooCommerce support

This topic has 4 replies, 2 voices, and was last updated 6 years ago ago by Rose Tyler

  • Avatar: Cardo
    Capri
    Participant
    April 20, 2018 at 10:39

    Hi,

    Can someone help me put the contact form 7 on my product custom tab? I don’t know how to do it.

    website

    Thanking in advance. I hope someone can guide me.

    3 Answers
    Avatar: Cardo
    Capri
    Participant
    April 20, 2018 at 11:45

    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

    Avatar: Cardo
    Capri
    Participant
    April 20, 2018 at 11:48

    Its working now.. I manage to fix it by removing white space after the ‘title’.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 20, 2018 at 12:12

    Hello,

    I am glad that you sorted out.
    Feel free to ask if you have any other questions.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.