get_title() ) . '" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">'; } /** * Default shop archive card elements. */ function botiga_get_default_shop_archive_card_elements() { $elements = array( 'botiga_shop_loop_product_title', 'woocommerce_template_loop_price' ); /** * Hook 'botiga_default_shop_archive_card_elements' * Filters the default shop archive card elements from customizer settings. * * @param array $elements Default elements. * * @since 2.2.2 */ return apply_filters( 'botiga_default_shop_archive_card_elements', $elements ); } /** * Default single product components */ function botiga_get_default_single_product_components() { $components = array( 'woocommerce_template_single_title', 'woocommerce_template_single_rating', 'woocommerce_template_single_price', 'woocommerce_template_single_excerpt', 'woocommerce_template_single_add_to_cart', 'botiga_divider_output', 'woocommerce_template_single_meta', ); $wishlist_enable = Botiga_Modules::is_module_active( 'wishlist' ); $wishlist_layout = get_theme_mod( 'shop_product_wishlist_layout', 'layout1' ); if( $wishlist_enable && 'layout1' !== $wishlist_layout ) { $components[] = 'botiga_single_wishlist_button'; } /** * Hook 'botiga_default_single_product_components' * * @since 1.0.0 */ return apply_filters( 'botiga_default_single_product_components', $components ); } /** * Single product elements */ function botiga_single_product_elements() { $elements = array( 'woocommerce_template_single_title' => esc_html__( 'Product Title', 'botiga' ), 'woocommerce_template_single_rating' => esc_html__( 'Rating', 'botiga' ), 'woocommerce_template_single_price' => esc_html__( 'Price', 'botiga' ), 'woocommerce_template_single_excerpt' => esc_html__( 'Short Description', 'botiga' ), 'woocommerce_template_single_add_to_cart' => esc_html__( 'Add to Cart', 'botiga' ), 'botiga_divider_output' => esc_Html__( 'Divider', 'botiga' ), 'woocommerce_template_single_meta' => esc_html__( 'Meta', 'botiga' ), ); $wishlist_enable = Botiga_Modules::is_module_active( 'wishlist' ); $wishlist_layout = get_theme_mod( 'shop_product_wishlist_layout', 'layout1' ); if( $wishlist_enable && 'layout1' !== $wishlist_layout ) { $elements[ 'botiga_single_wishlist_button' ] = esc_html__( 'Wishlist Button', 'botiga' ); } /** * Hook 'botiga_single_product_elements' * * @since 1.0.0 */ return apply_filters( 'botiga_single_product_elements', $elements ); } /** * Map and replace default woo template functions with quick view functions */ function botiga_get_quick_view_summary_components( $components = array() ) { $components = array_map( function( $component ){ $suffix = str_replace( 'woocommerce_template_single_', '', $component ); if( $component === "woocommerce_template_single_$suffix" ) { return "botiga_quick_view_summary_$suffix"; } return $component; }, $components ); /** * Hook 'botiga_quick_view_product_components' * * @since 1.0.0 */ return apply_filters( 'botiga_quick_view_product_components', $components ); } /** * Divider output */ function botiga_divider_output() { echo '
">get_price_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
'; echo wp_kses_post( $html ); echo ''; } /** * Single product elements 'Shortcode' output */ function botiga_single_product_shortcode() { $shortcode = get_theme_mod( 'botiga_single_product_shortcode_content', '' ); echo '