Difference with this code

Posted in: Newspaper
Post count: 90

I found 2 code for woocommerc image slider please clear what is difference with these 2 code—-
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );

add_action( 'after_setup_theme', 'yourtheme_setup' );
function yourtheme_setup() {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}

Post count: 35449

Hi,

Both codes are do the same thing, the difference is that the first one is applying in any condition and the second on is set in a function that is call after the theme settings are apply.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.