plugin_url() . '/assets/fonts/'; $inline_font = '@font-face { font-family: "star"; src: url("' . $font_path . 'star.eot"); src: url("' . $font_path . 'star.eot?#iefix") format("embedded-opentype"), url("' . $font_path . 'star.woff") format("woff"), url("' . $font_path . 'star.ttf") format("truetype"), url("' . $font_path . 'star.svg#star") format("svg"); font-weight: normal; font-style: normal; }'; wp_add_inline_style( 'shapla-woocommerce-style', $inline_font ); } /** * Set number of products to show per page * * @param $cols * * @return int */ public function loop_shop_per_page( $cols ) { $cols = get_theme_mod( 'wc_products_per_page', 12 ); return apply_filters( 'shapla_wc_products_per_page', intval( $cols ) ); } /** * Set number of products to show per column * * @param $cols * * @return int */ public function loop_shop_columns( $cols ) { $cols = get_theme_mod( 'wc_products_per_row', 4 ); return apply_filters( 'shapla_wc_products_per_row', intval( $cols ) ); } /** * Set number of related products per row * * @param $args * * @return mixed */ public function related_products_args( $args ) { $cols = get_theme_mod( 'wc_products_per_row', 4 ); $args['posts_per_page'] = apply_filters( 'shapla_wc_related_products_per_page', intval( $cols ) ); return $args; } /** * Set up sales display */ public function output_upsells() { $cols = get_theme_mod( 'wc_products_per_row', 4 ); $cols = apply_filters( 'shapla_wc_upsell_products_per_page', intval( $cols ) ); // Display 3 products in rows of 3 woocommerce_upsell_display( $cols, $cols ); } /** * Add custom div before show loop item */ public function wc_before_shop_loop_item() { echo '
'; } /** * Close custom div after shop loop item */ public function wc_after_shop_loop_item() { echo '
'; } } } return Shapla_WooCommerce::init();