• Resolved rblythe

    (@rblythe)


    This morning I was logged into my cPanel and looked at my WordPress error_log file. This file is flooded with entries that look like this:

    product_type was called incorrectly. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WC_REST_CRUD_Controller->get_items, WC_REST_Products_V2_Controller->prepare_object_for_response, WC_REST_Products_V2_Controller->get_product_data, WC_REST_CRUD_Controller->fetch_fields_using_getters, WC_REST_Products_V2_Controller->api_get_price_html, WC_Product_Variable->get_price_html, apply_filters('woocommerce_get_price_html'), WP_Hook->apply_filters, lw_hide_variation_price, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    How do I resolve this issue?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @rblythe,

    It looks like you have a plugin or some custom code on your site that is accessing the product_type information incorrectly.

    You are likely looking at a conflict with your theme or with another plugin. Read more about plugin and theme conflicts in our Self-Service Guide.

    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    System Status Report

    Please provide your site’s System Status Report? You can find it by going to “WooCommerce → Status” in your site’s WP-Admin.

    Click on “Get system report” and then “Copy for support”. Once you’ve done that, paste it in a .txt file and upload that to Dropbox, Google Drive, or some other such service and then paste the link to that file here.

    Cheers

    We haven’t heard back from you, so I’m marking this thread as resolved – we’ll be here if and/or when you are ready to continue.

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