Price label doesn’t show in the mini-cart

Top WooCommerce & WordPress Plugins Forums Custom Price Labels for WooCommerce Price label doesn’t show in the mini-cart

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #95202
    Jim Crate
    Guest

    The woocommerce_cart_product_price filter runs with the admin flag set because WooCommerce uses admin-ajax.php to generate the mini-cart. The custom_price() function in class-wc-custom-price-label.php just returns the price if is_admin(), so the price label doesn’t show in the mini-cart. Changing the check for admin as below allows the price to display with labels in the minicart too.

    if ( is_admin() && !doing_filter('woocommerce_cart_product_price') ) {
    	return $price;
    }
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.