3, 'columns' => 3, ); $args = wp_parse_args( $defaults, $args ); return $args; } add_filter( 'woocommerce_output_related_products_args', 'popularfx_woocommerce_related_products_args' ); /** * Remove default WooCommerce wrapper. */ remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); if ( ! function_exists( 'popularfx_woocommerce_wrapper_before' ) ) { /** * Before Content. * * Wraps all WooCommerce content in wrappers which match the theme markup. * * @return void */ function popularfx_woocommerce_wrapper_before() { ?>
get_average_rating(); $rating_html = '
'; echo $rating_html; } /** * Show cart contents / total Ajax */ add_filter( 'woocommerce_add_to_cart_fragments', 'popularfx_wc_header_add_to_cart_fragment' ); function popularfx_wc_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?>
  • cart->get_cart_contents_count();?>