rm19
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Plugins
In reply to: [Product Questions & Answers for WooCommerce] Hide Q&A tab if data not foundDear @arumugamact,
If you can’t do the CSS, here is the complete snippet with CSS which will hide the tab.
function custom_body_classes($classes) { if (is_product()) { $product = wc_get_product(); $productId = $product->get_id(); $all_questions = get_post_meta($productId, 'ets_question_answer', true); if (empty($all_questions)) { $classes[] = 'remove_qa_tab'; } } return $classes; } add_filter('body_class', 'custom_body_classes'); function add_custom_css_to_head() { echo '<style> body.remove_qa_tab .tabs .ask_tab { display: none; } </style>'; } add_action('wp_head', 'add_custom_css_to_head');
Forum: Plugins
In reply to: [Product Questions & Answers for WooCommerce] Hide Q&A tab if data not foundHii @arumugamact,
There is no direct hook in this case, but you have add following snippet on your child theme or snippet plugin to hide Q&A tab.
function custom_body_classes($classes) { if (is_product()) { $product = wc_get_product(); $productId = $product->get_id(); $all_questions = get_post_meta($productId, 'ets_question_answer', true); if (empty($all_questions)) { $classes[] = 'remove_qa_tab'; } } return $classes; } add_filter('body_class', 'custom_body_classes',999);
hii @shanedelierrr, the information provided by you is helped to me to resolve my issue. Thank you so much to quick response to me.
What is the disadvantage if we disable Hide Backend feature.
yes we enable Hide Backend feature.
Hi @lelek123,
Our plugin by default provides the service that it redirects to the product page after logging in.
Viewing 6 replies - 1 through 6 (of 6 total)