You should use $product->get_price()
take a look at WooCommerce
WC_Product
class.
Related Posts:
- Display featured products through custom loop in woocommerce on template page
- How to get the first image gallery of a product in woocommerce in a loop
- How to get_template_part using AJAX?
- Calling & display certain product category loop and pagination on the homepage
- woocommerce get_price_html not pulling in correct price
- How to check if a product is purchased within the last 365 days before displaying something
- Generating a perfect loop
- hide woocommerce tab if empty
- WordPress with woocommerce custom query
- WooCommerce custom loop pagination on front page
- WooCommerce – Checkout suddenly stops working [closed]
- Undefined variable: woocommerce_loop [closed]
- How to get Author ID outside the loop
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- How do I prevent one of two multiple loops from repeating on a second page?
- How to solve suspected memory issue in custom WordPress loop?
- What exactly defines a Main Loop and a Secondary Loop?
- Loop code is displaying pages but not actual posts
- How are both HTTP and HTTPS versions displaying?
- Display featured products through custom loop in WooCommerce 3 [closed]
- Ajax loop refresh on click
- How do you split multiple-column loop on category archive page?
- How to Loop within a Loop (Display Children and then Grandchildren)
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Is get_posts() more efficient than The Loop?
- loop through all posts memory error
- WooCommerce Only OnSale Products Loop Snippet [closed]
- Get titles of all posts with current tags except current post
- Creating a multi-taxonomy query, excluding the newest (read: highest ID) taxonomy term
- Show a different post every 3 days [duplicate]
- Targeting a Certain Post in Loop (CSS)
- Get post/page data outside the loop
- Display most viewed post from last 30 days is not working correctly
- What is the maximum number of posts a WordPress loop can work with?
- wp_query inside the_loop
- Split loop to load WordPress gallery into Bootstrap modal and carousel
- Trouble Formatting DateTime
- Order archive results by post id in custom taxonomy template
- pre_get_posts for two loops on same page
- WordPress Rewriting the DOM?
- Modified loop-single-forum.php to work inside of a sidebar Widget, not working on some site pages
- Basic multiple loops only displaying first loop
- Problem with displaying HTML content after in_array [closed]
- Both a page loop and posts loop on the same page
- Variable not being passed into WordPress loop
- Display Posts Only with Specific Tag
- How to get my loop to paginate?
- Group posts by date with a list
- Add class to last 3 posts in loop
- Will only show the first 10 wordpress posts instead of all my posts
- How to get a list of bundled products using wp_query in woocommerce
- WP Loop. If featured image is a panorama (3:1 ratio) execute some code
- Count post views in loop
- displaying recent comments outside loop without plugin
- get_the_ID not returning correct ID value
- Include future posts in tags and in search
- Separate First Post Loop
- add offset to archive page
- loop inside the foreach
- Two Sections on Woocommerce Catergory Page [closed]
- make get_post work in the loop
- How to display 3 post per slide
- How to put a block of code between [shortcode][/shortcode] in do_shortcode()?
- current-user_can not working in loop
- Show terms in archive page
- How can I access a post’s feature image outside the loop?
- Multiple loops for plugin
- Sort posts according to a numeric value entered with ACF
- Is it possible to set archive.php instead of index.php to display blog?
- How to read taxonomy in loop?
- Undefined index: page in loop load ajax content
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Only Show Excerpt After First 3 Posts
- How to get all multi-select user meta values and add them to an array?
- How to insert content before pagination in loop?
- How to resolve a reload loop issue in the frontend when logged in to WordPress multi-site backend admin area
- Excerpt isn’t working or am I missing something?
- Can I temporarily disable global $post?
- Deeply Nested Menu Loop with Twig using Timber [closed]
- WordPress redundant posts based on meta field
- Get featured image outside the loop using foreach
- Infinite Loop after Genesis Theme Upgrade
- pre_get_posts main_query not displaying after applying tax_query filters
- WordPress loop only displays 5 articles max?
- setup_postdata in “loop-handling” php file called via $.ajax
- Secondary loop cuts off at 10 posts?
- get all page templates
- Paged homepage – requirements?
- Least Number of Loops to Create Custom Homepage?
- strange parse error when including a loop template within another template
- Previous Posts Link and Next Posts Link Show All The Same Articles?
- Custom product loop avoiding duplicates
- Posts Loops To Display Specific Posts Inside Page Template?
- Use callback function in AJAX pure javascript [closed]
- title not being printed within html tag [closed]
- How to get files from loop for zip
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- Divide loop into several columns based on post custom field and enable infinite scrolling
- Query Loop Block: possible to restrict just child pages?