This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* wc_direct_link_to_product_tabs | |
* | |
* Allows you to create custom URLs to activate product tabs by default, directly from the URL. | |
* ex: http://mysite.com/my-product-name#reviews | |
* this fork add history.pushState and each tab will be treated as a page | |
* so you can use browser history back / forward to move along tabs | |
*/ | |
add_action( 'wp_footer', function () { |