ASTRA_Ext_WooCommerce_Markup::woo_single_product_layouts()

Woocommece single product layouts.


Description


Return

(mixed)


Source

File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php

		public function woo_single_product_layouts() {

			if ( class_exists( 'woocommerce' ) && is_product() ) {

				// Vertical product gallery slider.
				if ( 'vertical-slider' === astra_get_option( 'single-product-gallery-layout' ) || 'horizontal-slider' === astra_get_option( 'single-product-gallery-layout' ) ) {
					remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
					add_action( 'woocommerce_before_single_product_summary', array( $this, 'woo_single_product_gallery_output' ), 20 );

					add_filter(
						'woocommerce_gallery_thumbnail_size',
						function( $size ) {
							return 'thumbnail';
						}
					);

					add_filter( 'woocommerce_single_product_carousel_options', array( $this, 'filter_single_product_carousel_options' ) );
				}

				// First image large gallery.
				if ( 'first-image-large' === astra_get_option( 'single-product-gallery-layout' ) ) {

					remove_theme_support( 'wc-product-gallery-slider' );

					add_filter(
						'woocommerce_gallery_thumbnail_size',
						function( $size ) {
							return 'medium';
						}
					);
				}
			}
		}

Changelog

Changelog
Version Description
3.9.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.