Update Woocommerce 3 Banyak Error !!

woocommerce wordpress plugin toko online mudah dan cepat
woocommerce wordpress plugin toko online mudah dan cepat

Woocommerce saat ini masih menjadi plugin favorit untuk membuat toko online menggunakan CMS WordPress. Beberapa saat jika ada bug selalu dilakukan update oleh para developer. Seperti mayor update yang di lakukan Woocommerce akhir ini yaitu dari Woocommerce versi 2 ke versi 3 tentu banyak perubahan di segi code.

Perubahan di segi kode tentu akan sangat berpengaruh untuk developer WordPress theme yang support dengan Woocommerce. Banyak sekali fungsi – fungsi yang berubah.

Salah satu yang akan kentos bahas adalah muncul spam error yang bikin puyeng. hehe..

Notice: 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’), include(‘/themes/utama/woocommerce/single-product.php’), get_header, locate_template, load_template, require_once(‘/themes/utama/header.php’), wp_head, do_action(‘wp_head’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, Webdados_FB_Public->insert_meta_tags, WC_Product->__construct, WC_Product->get_type, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /wp-includes/functions.php on line 4138

Notice: Undefined property: WC_Product::$product_type in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php on line 139

Singkat error seperti log error diatas.

Langsung saja kentos kasih tau solusi mengilangkan log error di atas. Caranya tinggal ubah baris kode dibawah ini saja.

$product->ID to $product->get_id()

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply