• Resolved scmsteve

    (@scmsteve)


    We are seeing these errors in our site’s logs, and since it includes the woo-product-feed-pro in the traceback I am not sure if it is related or not, or if this plugin is just an “innocent victim” being brought along for the ride.

    The product ID mentioned here is a simple product, but it looks like the code is trying to use it as a variation.

    PHP Fatal error: Uncaught WC_Data_Exception: Invalid product type: passed ID does not correspond to a product variation. in /home/sitedir/public_html/wp-content/plugins/woocommerce/includes/data-stores
    /class-wc-product-variation-data-store-cpt.php:58
    Stack trace:
    #0 /home/sitedir/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Variation_Data_Store_CPT->read(Object(WC_Product_Variation))
    #1 /home/sitedir/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product_Variation))
    #2 /home/sitedir/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php(24): WC_Product->__construct(533154)
    #3 /home/sitedir/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variation.php(54): WC_Product_Simple->__construct(533154)
    #4 /home/sitedir/public_html/wp-content/plugins/woo-product-feed-pro/woocommerce-sea.php(1595): WC_Product_Variation->__construct(533154)
    #5 /home/sitedir/public_ in /home/sitedir/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php on line 58

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Steve,

    That is exactly what it is trying to do strangely enough. WooCommerce indicates something is a variation product and when the plugin is trying to retrieve product information for that variation WooCommerce returns a message that it’s not a variation at all. We have seen this WooCommerce behaviour before when a product used to be a variable product and was reverted back to a simple product.

    Anyhow, we have build in an extra check in the plugin so it can handle this strange behaviour. In our next release (7.9.3) the PHP error should be gone.

    Thread Starter scmsteve

    (@scmsteve)

    Thanks again! I have looked through the logs and it seems it is consistent and only that one product, so I can take a look at it and see if it was a converted product type and remove any old metadata.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught WC_Data_Exception’ is closed to new replies.