Guest User

Untitled

a guest
Jan 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #-----------------------------------------------------------------#
  2. # Woocommerce
  3. #-----------------------------------------------------------------#
  4. add_filter( 'woocommerce_account_menu_items', 'ag_remove_downloads', 999 );
  5.  
  6. function ag_remove_downloads( $items ) {
  7. unset($items['downloads']);
  8. return $items;
  9. }
  10.  
  11. //Remove WooCommerce Tabs - this code removes all 3 tabs - to be more specific just remove actual unset lines
  12. add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
  13. function woo_remove_product_tabs( $tabs ) {
  14. unset( $tabs['description'] ); // Remove the description tab
  15. unset( $tabs['reviews'] ); // Remove the reviews tab
  16. unset( $tabs['additional_information'] ); // Remove the additional information tab
  17. return $tabs;
  18. }
  19.  
  20. /** Remove short description if product tabs are not displayed */
  21. function dot_reorder_product_page() {
  22. if ( get_option('woocommerce_product_tabs') == false ) {
  23. remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
  24. }
  25. }
  26. add_action( 'woocommerce_before_main_content', 'dot_reorder_product_page' );
Add Comment
Please, Sign In to add comment