Price label doesn’t show in the mini-cart

  • This topic has 0 replies, 1 voice, and was last updated 7 years ago by Jim Crate.
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)
  • The forum ‘Custom Price Labels for WooCommerce’ is closed to new topics and replies.