Answer the question
In order to leave comments, you need to log in
What is the difference between $single_variation->get_price(); and woocommerce_template_loop_price();?
The question is not that in the first variant a numerical value is displayed, but in the second a whole price block.
The issue is that I'm using the currency change plugin, but when I display woocommerce_template_loop_price it displays the correct price of the product, and when I try to display the variation price, it displays in the standard currency.
<? foreach ( $variations as $variation ) { ?>
<? $single_variation = new WC_Product_Variation( $variation ); ?>
<?= $single_variation->get_price(); ?>
<? } ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question