Trigger woocommerce_tab_shown when a tab is shown

This commit is contained in:
Matt Sherman 2023-07-31 18:11:52 -04:00
parent 119ab3c3bb
commit 8f4b123d80
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ jQuery( function ( $ ) {
$( 'ul.wc-tabs li', panel_wrap ).removeClass( 'active' );
$( this ).parent().addClass( 'active' );
$( 'div.panel', panel_wrap ).hide();
$( $( this ).attr( 'href' ) ).show();
$( $( this ).attr( 'href' ) ).show( 0, function () {
$( this ).trigger( 'woocommerce_tab_shown' );
} );
} );
$( 'div.panel-wrap' ).each( function () {
$( this )