Woocommerce: Display Variation Price in Dropdown
-
Hi I’m using the following Loop to display individual prices for each option in a variations dropdown for woocommerce:
add_filter('woocommerce_variation_option_name' ,'add_price_to_dropdown'); function add_price_to_dropdown($name){ global $product; $product = new WC_Product_Variation($variation_id); return $name.' - '.$product->get_price_html(); }
It adds a price next to each variance, BUT it’s saying that they are ALL FREE!
Can someone help me, maybe?
- The topic ‘Woocommerce: Display Variation Price in Dropdown’ is closed to new replies.