Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce Tab Manager - Force Tab Resize
<?php
/**
* Plugin Name: WooCommerce Tab Manager Force Resize
* Plugin URI: http://www.skyverge.com/contact
* Description: Forces the product page tabs to resize when clicked
* Author: SkyVerge
* Author URI: http://www.skyverge.com
* Version: 1.0.0
*
* Copyright: (c) 2015 SkyVerge, Inc. (info@skyverge.com)
*
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
function wc_tab_manager_force_tab_resize() {
wc_enqueue_js( '
$( ".woocommerce-tabs [class$=\'_tab\'] a" ).click( function() {
var selector = $( this ).attr( "href" );
$( selector ).resize()
} );
' );
}
add_action( 'woocommerce_after_single_product_summary', 'wc_tab_manager_force_tab_resize' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.