Astra_Woocommerce::single_product_class( Array $classes )

Add class on single product page


Description


Parameters

$classes

(Array) (Required) product classes.


Return

(array.)


Source

File: inc/compatibility/woocommerce/class-astra-woocommerce.php

		public function single_product_class( $classes ) {

			if ( is_product() && 0 == get_post_meta( get_the_ID(), '_wc_review_count', true ) ) {
				$classes[] = 'ast-woo-product-no-review';
			}

			if ( is_shop() || is_product_taxonomy() ) {
				$hover_style = astra_get_option( 'shop-hover-style' );

				if ( '' !== $hover_style ) {
					$classes[] = 'astra-woo-hover-' . $hover_style;
				}
			}

			return $classes;
		}


User Contributed Notes

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