Want to Display Woocommerce product price on sidebar
-
Hello, I am Rookie in wordpress, I wanted to print the price of woocommerce product on the another page, I had manage to write the function in function.php file but I want to transfer the output on the another file.
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
add_filter('woocommerce_get_price_html','wpa_price_html'); function wpa_price_html($price, $product){ global $pro_price; $pro_price = $price; echo $pro_price; //It's print the price return $pro_price; }
I used apply filter but getting error
<?php echo apply_filters('woocommerce_get_price_html',''); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Want to Display Woocommerce product price on sidebar’ is closed to new replies.