I am trying to get all product variation along with price. I am using below code but price is not coming
$terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
Any idea how i can get price as well along with price as DESC order
Thanks
2
Answers
Depending on your need use
You can use this code for variation with the price. I check here if product type variable then it shows.
Here I attach also a screenshot.
Note: If you want to show it another location you learn about single product hook.