• Resolved ramon fincken

    (@ramon-fincken)


    [:error] [pid 28999] id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_update_order_review’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::update_order_review, woocommerce_order_review, wc_get_template, include(‘/plugins/woocommerce/templates/checkout/review-order.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: https://www.site.com/afrekenen/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Thanks for sharing this message.

    This code has been already updated in v1.6 of my plugin which will be released shortly.

    Hi,

    Is this really fixed? Because the error seems to still persist on v.1.6.1.

    For example in the plugin file woocommerce.php lines 34-36:

    $product_id = $product->get_id();
    
    			$_product_cats = get_the_terms( $product->id, 'product_cat' );

    So shouldn’t the line 36 be:

    $_product_cats = get_the_terms( $product_id, 'product_cat' );

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Some more fix has been added to the development version that change the mentioned lines as well. You can check it here:
    https://raw.githubusercontent.com/duracelltomi/gtm4wp/master/integration/woocommerce.php

    I am still testing this to see whether there are any other issues I may need to fix before a release.

    Thomas

    Hi Thomas

    For your information, i’m using GTM ver. 1.6.1 and recently I’ve updated my webshop to Woocomemrce ver. 3.0.8 and now ver. 3.0.9 and I’m stil getting these warnings in my log.

    –oo–

    [Wed Jun 28 10:33:55.706353 2017] [:error] [pid 14961] [client 2.105.219.19:46713] product_type was called incorrectly. Produktsegenskaber burde ikke tilg\xc3\xa5s direkte. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_update_order_review’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::update_order_review, woocommerce_order_review, wc_get_template, include(‘/themes/dt-the7/woocommerce/checkout/review-order.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, call_user_func_array, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: https://babydk.dk/kassen/

    –00–

    Do you know if there is any progress fixing this issue?

    Thanks

    Best regards
    Jan

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi Jan,

    Could you install the latest beta?
    https://github.com/duracelltomi/gtm4wp/releases

    This should fix those messages.
    If not, please let me know so that I can do another round of review.

    Thanks,
    Thomas

    Hi Thomas

    Thanks for your reply. I’ve updated to the latest gtm4wp – v1.7 beta 2.

    The updated fixed the many errormessages added in my error log. I haven’t been testing much, but haven’t found any problems using the beta plugin. Only notice is the beta plugin version number is still 1.6.1 even after update ??

    Thanks
    Jan

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Thanks for the feedback, I just released a new beta, most probably the last beta from this version that also fixes the version numbers ??

    It looks like v 1.7 RC 2 also fixed the issue.

    I no longer see these errors in error_log:

    [31-Jul-2017 19:54:16 UTC] id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_get_refreshed_fragments’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/themes/versatek/woocommerce/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, call_user_func_array, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    [31-Jul-2017 19:54:16 UTC] post was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_get_refreshed_fragments’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/themes/versatek/woocommerce/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, call_user_func_array, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    [31-Jul-2017 19:54:16 UTC] product_type was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_get_refreshed_fragments’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/themes/versatek/woocommerce/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, call_user_func_array, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    [31-Jul-2017 19:54:16 UTC] id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_get_refreshed_fragments’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/themes/versatek/woocommerce/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, call_user_func_array, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi @rpsandiego,

    Thanks for the update.
    Some more fixes has been applied to the code yesterday (after releasing v1.7RC2 on GitHub) – just one more check has to be done today and I think the final v1.7 can be released to the public.

    Have a great day,
    Thomas Geiger

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wc_doing_it_wrong : id was called incorrectly. Product properties should not be’ is closed to new replies.