WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Bug in product variation class (2 posts)

  1. barteled
    Member
    Posted 5 months 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 5 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.