Update single-product.js for issue #38711

The href attribute will now be splitted by the hash to ensure that the script will work even in case of an absolute link in the tab anchor href.
This commit is contained in:
Samuele Mancuso 2023-06-14 10:56:55 +02:00 committed by GitHub
parent 604132391a
commit 3e82a8771b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ jQuery( function( $ ) {
$tabs_wrapper.find( '.wc-tab, .panel:not(.panel .panel)' ).hide();
$tab.closest( 'li' ).addClass( 'active' );
$tabs_wrapper.find( $tab.attr( 'href' ) ).show();
$tabs_wrapper.find( "#"+$tab.attr( 'href').split('#')[1] ).show();
} )
// Review link
.on( 'click', 'a.woocommerce-review-link', function() {