Support » Plugin: WooCommerce » Bug in product variation class

  • 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?

Viewing 1 replies (of 1 total)
  • Roy Ho


    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Bug in product variation class’ is closed to new replies.