'; } add_action( 'woocommerce_before_shop_loop', 'nnfy_before_shop_loop_left_wrapper_end', 35); function nnfy_before_shop_loop_left_wrapper_end(){ echo "
"; } add_action( 'woocommerce_before_shop_loop', 'nnfy_archive_view_switch', 40 ); function nnfy_archive_view_switch(){ ?>
'', 'btn_added_text' => '', 'btn_exist_text' => '', ]; add_filter( 'wishsuite_button_arg', function( $button_arg ) use ( $button_args ) { $button_arg['button_text'] = $button_args['btn_text']; $button_arg['button_added_text'] = $button_args['btn_added_text']; $button_arg['button_exist_text'] = $button_args['btn_exist_text']; return $button_arg; }, 90, 1 ); $output .= '
'.do_shortcode('[wishsuite_button]').'
'; return $output; }elseif( class_exists( 'YITH_WCWL' ) && !empty( get_option( 'yith_wcwl_wishlist_page_id' ) ) ){ global $yith_wcwl; $url = YITH_WCWL()->get_wishlist_url(); $product_type = $product->get_type(); $exists = $yith_wcwl->is_product_in_wishlist( $product->get_id() ); $classes = 'class="add_to_wishlist"'; $add = get_option( 'yith_wcwl_add_to_wishlist_text' ); $browse = get_option( 'yith_wcwl_browse_wishlist_text' ); $added = get_option( 'yith_wcwl_product_added_text' ); $output = ''; $output .= '
'; $output .= ''; $output .= ''; $output .= '
'; $output .= '
'; return $output; }else{ return; } } // format price html add_filter( 'woocommerce_format_sale_price', 'nnfy_format_sale_price', '', 4 ); function nnfy_format_sale_price($price, $regular_price, $sale_price){ $price = '' . ( is_numeric( $sale_price ) ? wc_price( $sale_price ) : $sale_price ) . ' ' . ( is_numeric( $regular_price ) ? wc_price( $regular_price ) : $regular_price ) . ''; return $price; } // customize rating html add_filter( 'woocommerce_product_get_rating_html', 'nnfy_wc_get_rating_html', '', 3 ); function nnfy_wc_get_rating_html($html, $rating, $count){ global $product; if ( $rating > 0) { $rating_whole = floor($rating); $rating_fraction = $rating - $rating_whole; $wrapper_class = is_single() ? 'rating-number' : 'top-rated-rating'; ob_start(); ?>
'; } else { if($rating_fraction){ echo ''; } else { echo ''; } } } ?>
'; if(function_exists('nnfy_add_to_wishlist_button')){ echo nnfy_add_to_wishlist_button(); } echo ''; } function nnfy_woocommerce_template_loop_product_thumbnail(){ global $product; ?>
get_attributes(); if($attributes) : ?>
get_name(); $values = wc_get_product_terms( $product->get_id(), $name, array( 'fields' => 'all' ) ); if( $item['name'] == 'pa_size'): ?>
'.$item->name.' '; } } ?>
    name ); $link = get_term_link( $item->term_id, $name ); $color = get_term_meta( $item->term_id, 'color', true ); if( !empty($link) ){ echo '
  • '.esc_html($product_term_name).'
  • '; }else{ echo '
  • '.esc_html($product_term_name).'
  • '; } } } ?>

$product_id,'post_type' => array('product','product_variation')); $query = new WP_Query($params); if($query->have_posts()){ while ($query->have_posts()){ $query->the_post(); include get_template_directory().'/woocommerce/content-quickview.php'; } } wp_reset_postdata(); die(); } add_action( 'woocommerce_before_add_to_cart_quantity', 'nnfy_product_variation_image' ); function nnfy_product_variation_image() { global $product; if ( $product->is_type('variable') ) { ?>