WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WooCommerce
Bug in product variation class (2 posts)

  1. barteled
    Member
    Posted 2 years ago #

    When I upgraded to 2.1.3 my product listings, product display, and product list in the admin interface were all broke. The listings would only show one product and then crash. The product would not display on the single product page.

    I traced it down to code in class-wc-product-variations.php. get_variation_regular_price and get_variation_sale_price assume that each product has a min or max price variation meta. This is not the case in my setup. It could have to do with we have a lot of variations with no price because we set them programmatically else where. I've update line 176 and 195 to look like this:

    if ( $display and !empty($variation_id)) {

    This seemed to resolve all the issues but if I'm having this kind of issue is there something else I am missing? Can this be included in the next release?

    https://wordpress.org/plugins/woocommerce/

  2. Roy Ho
    Member
    Posted 2 years ago #

    Even if you didn't have any prices set for a variable product, it would not crash it like you explained. It must be something else.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.