'; // Get elements. $elements = oceanwp_woo_product_elements_positioning(); // Loop through elements. foreach ( $elements as $element ) { // Image. if ( 'image' === $element ) { echo '
  • '; do_action( 'ocean_before_archive_product_image' ); if ( class_exists( 'OceanWP_WooCommerce_Config' ) ) { OceanWP_WooCommerce_Config::add_out_of_stock_badge(); } woocommerce_show_product_loop_sale_flash(); if ( class_exists( 'OceanWP_WooCommerce_Config' ) ) { OceanWP_WooCommerce_Config::loop_product_thumbnail(); } do_action( 'ocean_after_archive_product_image' ); echo '
  • '; } // Category. if ( 'category' === $element ) { do_action( 'ocean_before_archive_product_categories' ); echo wp_kses_post( wc_get_product_category_list( $product->get_id(), ', ', '
  • ', '
  • ' ) ); do_action( 'ocean_after_archive_product_categories' ); } // Title. if ( 'title' === $element ) { $heading = 'h2'; $heading = apply_filters( 'ocean_product_archive_title_tag', $heading ); do_action( 'ocean_before_archive_product_title' ); echo '
  • '; do_action( 'ocean_before_archive_product_title_inner' ); if ( false === $ocean_woo_disable_links || ( $disable_links && is_user_logged_in() ) ) { echo '<' . esc_attr( $heading ) . '>' . get_the_title() . ''; } else { echo '<' . esc_attr( $heading ) . '>' . get_the_title() . ''; } do_action( 'ocean_after_archive_product_title_inner' ); echo '
  • '; do_action( 'ocean_after_archive_product_title' ); } // Price. if ( 'price-rating' === $element ) { do_action( 'ocean_before_archive_product_inner' ); if ( false === $ocean_woo_cond || $show_woo_cond ) { echo '
  • '; do_action( 'ocean_before_archive_product_price' ); woocommerce_template_loop_price(); do_action( 'ocean_after_archive_product_price' ); echo '
  • '; } do_action( 'ocean_after_archive_product_inner' ); } // Star Rating. if ( 'woo-rating' === $element ) { echo '
  • '; do_action( 'ocean_before_archive_product_rating' ); woocommerce_template_loop_rating(); do_action( 'ocean_after_archive_product_rating' ); echo '
  • '; } // Description for product archive List view. if ( 'description' === $element ) { do_action( 'ocean_before_archive_product_description' ); if ( ( oceanwp_is_woo_shop() || oceanwp_is_woo_tax() ) && get_theme_mod( 'ocean_woo_grid_list', true ) ) { $length = get_theme_mod( 'ocean_woo_list_excerpt_length', '60' ); echo '
  • '; if ( ! $length ) { echo wp_kses_post( strip_shortcodes( $post->post_excerpt ) ); } else { echo wp_trim_words( strip_shortcodes( $post->post_excerpt ), $length ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
  • '; } do_action( 'ocean_after_archive_product_description' ); } // Add to cart button. if ( 'button' === $element ) { do_action( 'ocean_before_archive_product_add_to_cart' ); if ( false === $ocean_woo_cond || $show_woo_cond ) { echo '
  • '; do_action( 'ocean_before_archive_product_add_to_cart_inner' ); woocommerce_template_loop_add_to_cart(); do_action( 'ocean_after_archive_product_add_to_cart_inner' ); echo '
  • '; } else { // Get conditional message display state. $ocean_woo_cond_msg = get_theme_mod( 'ocean_shop_cond_msg', 'yes' ); if ( $ocean_woo_cond_msg === 'yes' ) { // Get Add to Cart button replacement message. $woo_cond_message = get_theme_mod( 'ocean_shop_msg_text' ); $woo_cond_message = $woo_cond_message ? $woo_cond_message : esc_html__( 'Log in to view price and purchase', 'oceanwp' ); $woo_add_myaccunt_link = get_theme_mod( 'ocean_shop_add_myaccount_link', false ); echo '
  • '; if ( false === $woo_add_myaccunt_link ) { echo ''. $woo_cond_message .''; } else { echo '' . $woo_cond_message . ''; } echo '
  • '; } } do_action( 'ocean_after_archive_product_add_to_cart' ); } } echo ''; do_action( 'ocean_after_archive_product_item' );