• Resolved alanfrys

    (@alanfrys)


    Hi, i want to appear the plugin like a part, not like a tab i dont know if its understund.

    I want the plugin appear after the product description and image and them be the tabs.

    I applied this code i founded in the forum, but made the page broke

    remove_filter ( 'woocommerce_product_tabs', array( YITH_WooCommerce_Question_Answer::get_instance(), 'show_question_answer_tab' ), 20 );
    if (class_exists('YITH_WooCommerce_Question_Answer')){
        if (!function_exists('yith_ywqa_show_questions_and_answer')){
            function yith_ywqa_show_questions_and_answer(){
                $instance = YITH_WooCommerce_Question_Answer::get_instance();
                $instance->show_question_answer_template();
            }
            add_action ( 'woocommerce_after_single_product_summary', 'yith_ywqa_show_questions_and_answer' );
        }
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    hope you are doing well! ??

    The code is almost perfect.
    Please, try this one:

    if ( class_exists('YITH_WooCommerce_Question_Answer') ){
    	remove_filter ( 'woocommerce_product_tabs', array( YITH_WooCommerce_Question_Answer::get_instance(), 'show_question_answer_tab' ), 20 );
    	if (!function_exists('yith_ywqa_show_questions_and_answer')){
    		function yith_ywqa_show_questions_and_answer(){
    			$instance = YITH_WooCommerce_Question_Answer::get_instance();
    			$instance->show_question_answer_template();
    		}
    		add_action ( 'woocommerce_after_single_product_summary', 'yith_ywqa_show_questions_and_answer', 2 );
    	}
    }

    Let us know.

    Have a nice day!

    Thread Starter alanfrys

    (@alanfrys)

    Hi Ivan! thank for the answer.

    I put that code in the function.phph, but doesnt do anything in the site

    What can i do?

    Thank you!

    Plugin Support Alexis Salazar

    (@asaldel)

    Hello there,

    hope you are doing well ??

    We have been checking and trying the code provided and it is working correctly, as you can see in this image.

    Could you try with a default WordPress theme like TwentyTwenty and check if the code now works, please?

    Let us know any news, please.

    Have a nice day!

    Thread Starter alanfrys

    (@alanfrys)

    Hi Alexis!

    I want to be like that image. But in my theme doesnt work, i tried in the twentytwenty and doesnt work too.

    Thank you anyway

    Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    maybe your theme is not using the default WooCommerce hooks.

    I kindly suggest contact with your theme and check what exactly happens.
    Maybe they use different hooks to apply this change.

    Let us know.

    Have a nice day!

    Thread Starter alanfrys

    (@alanfrys)

    Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    I am setting this topic to solved for now as we have no more news from you, but please feel free to open a new one at any time to receive additional support on this issue.

    Have a great day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How can i change the position?’ is closed to new replies.