SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function woocommerce_default_product_tabs( $tabs = array() ) {
  2.     global $product, $post;
  3.  
  4.     // Description tab - shows product content
  5.     if ( $post->post_content ) {
  6.         $tabs['description'] = array(
  7.             'title'    => __( 'Description', 'woocommerce' ),
  8.             'priority' => 10,
  9.             'callback' => 'woocommerce_product_description_tab'
  10.         );
  11.     }
  12.      
  13. add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
  14.  
  15. function woo_remove_product_tabs( $tabs ) {
  16.     unset( $tabs['description'] );          // Remove the description tab
  17.     unset( $tabs['reviews'] );          // Remove the reviews tab
  18.     unset( $tabs['additional_information'] );   // Remove the additional information tab
  19.     return $tabs;
  20. }
  21.      
  22. add_filter( 'woocommerce_product_tabs', 'woo_remove_tabs', 98 );
  23. function woo_remove_tabs( $tabs ){
  24.     if(is_product()){
  25.       unset( $tabs['description'] ); // Remove the description tab
  26.       unset( $tabs['reviews'] ); // Remove the reviews tab
  27.       unset( $tabs['additional_information'] ); // Remove the additional information tab
  28.       }
  29.   return $tabs;
  30.  }
  31.      
  32. remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);
  33.      
  34. .woocommerce_tabs .tabs {
  35.     display: none;
  36. }
  37.      
  38. add_filter( 'woocommerce_product_tabs', 'wcs_woo_remove_reviews_tab', 98 );
  39. function wcs_woo_remove_reviews_tab($tabs) {
  40. unset($tabs['reviews']);
  41. return $tabs;
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top