• Resolved Mark

    (@markpfaff)


    The way you access id’s in woocommerce 3.0 has changed. You have to use $product->get_id() instead of $product->id I think that’s why it’s showing this notice:

    Notice: id was called
    incorrectly
    . Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), 
    require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/taxonomy-product_cat.php'), 
    wc_get_template, include('/themes/alienship/woocommerce/archive-product.php'), wc_get_template_part, load_template, 
    require('/plugins/woocommerce/templates/content-product.php'), do_action('woocommerce_after_shop_loop_item'), 
    WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, woocommerce_template_loop_add_to_cart, wc_get_template, include('/plugins/woocommerce/templates/loop/add-to-cart.php'), 
    WC_Product_Simple->add_to_cart_url, apply_filters('woocommerce_product_add_to_cart_url'), 
    WP_Hook->apply_filters, call_user_func_array, WooClientFixedQuantity->add_to_cart_url, WC_Abstract_Legacy_Product->__get, 
    wc_doing_it_wrong Please see Debugging in WordPress for more information. 
    (This in /nas/content/staging/universallife/wp-includes/functions.php on line 4138
    • This topic was modified 7 years, 9 months ago by Mark.
    • This topic was modified 7 years, 9 months ago by bdbrown.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘ID called incorrectly’ is closed to new replies.