Advertisement
lorro

WooCommerce - Find Custom Tab Keys

Apr 21st, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.   // the standard WooCommerce tab keys are "description", "reviews" and "additional_information"
  3.   // this code will find any custom tab keys on your system
  4.   // remove after use
  5.   // code goes in functions.php of your child theme
  6.   // Version 1.0
  7.   add_filter('woocommerce_product_tabs', 'woo_tab_keys', 97);
  8.   function woo_tab_keys($tabs) {
  9.     foreach ($tabs as $key => $tab) {
  10.       echo '<p>Tab key: '.$key.'</p>'.PHP_EOL;
  11.     }
  12.     return $tabs;
  13.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement