cart->get_cart_subtotal() ); ?> cart->get_cart_contents_count(), 'eighteen-tags' ), WC()->cart->get_cart_contents_count() ) );?>
';
}
/**
* Sorting wrapper close
* @since 1.4.3
* @return void
*/
function eighteen_tags_sorting_wrapper_close() {
echo '';
}
/**
* Eighteen tags shop messages
* @since 1.4.4
* @uses do_shortcode
*/
function eighteen_tags_shop_messages() {
if ( ! is_checkout() ) {
echo wp_kses_post( eighteen_tags_do_shortcode( 'woocommerce_messages' ) );
}
}
/**
* Eighteen tags WooCommerce Pagination
* WooCommerce disables the product pagination inside the woocommerce_product_subcategories() function
* but since Eighteen tags adds pagination before that function is excuted we need a separate function to
* determine whether or not to display the pagination.
* @since 1.4.4
*/
if ( ! function_exists( 'eighteen_tags_woocommerce_pagination' ) ) {
function eighteen_tags_woocommerce_pagination() {
if ( woocommerce_products_will_display() ) {
woocommerce_pagination();
}
}
}
/**
* Featured and On-Sale Products
* Check for featured products then on-sale products and use the appropiate shortcode.
* If neither exist, it can fallback to show recently added products.
* @since 1.5.1
* @uses is_woocommerce_activated()
* @uses wc_get_featured_product_ids()
* @uses wc_get_product_ids_on_sale()
* @uses eighteen_tags_do_shortcode()
* @return void
*/
if ( ! function_exists( 'eighteen_tags_promoted_products' ) ) {
function eighteen_tags_promoted_products( $per_page = '2', $columns = '2', $recent_fallback = true ) {
if ( is_woocommerce_activated() ) {
if ( wc_get_featured_product_ids() ) {
echo '' . esc_html__( 'Featured Products', 'eighteen-tags' ) . '
';
echo eighteen_tags_do_shortcode( 'featured_products', array(
'per_page' => $per_page,
'columns' => $columns,
) );
} elseif ( wc_get_product_ids_on_sale() ) {
echo '' . esc_html__( 'On Sale Now', 'eighteen-tags' ) . '
';
echo eighteen_tags_do_shortcode( 'sale_products', array(
'per_page' => $per_page,
'columns' => $columns,
) );
} elseif ( $recent_fallback ) {
echo '' . esc_html__( 'New In Store', 'eighteen-tags' ) . '
';
echo eighteen_tags_do_shortcode( 'recent_products', array(
'per_page' => $per_page,
'columns' => $columns,
) );
}
}
}
}