Web-user
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] wc_get_product now working at woocommerce 3.xHi,
After updating to Woocommerce 3.x, wc_get_product does not work.
I want to get product title, content and I use below code;$object = wc_get_product( $ID ); $data = get_post_meta( $ID ); $product['ID'] = $ID; $product['object'] = $object; $product['status'] = $object->post->post_status; $product['author'] = intval( $object->post->post_author ); $product['content'] = $object->post->post_content; $product['title'] = $object->post->post_title;Notice: post 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/yours-commercial-network/template-shop-products.php’), WooClass::getProduct, 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 www/wp-work-theme.loc/wp-includes/functions.php on line 4137
Forum: Plugins
In reply to: [WooCommerce] wc_get_product now working at woocommerce 3.xHi,After updating to Woocommerce 3.x, wc_get_product does not work.
I want to get product title and content and I use below code;$product = array(); $object = wc_get_product( $ID ); $product['ID'] = $ID; $product['object'] = $object; $product['status'] = $object->post->post_status; $product['author'] = intval( $object->post->post_author ); $product['content'] = $object->post->post_content; $product['title'] = $object->post->post_title;Notice: post was called <strong>incorrectly</strong>. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/yours-commercial-network/template-shop-products.php'), WooClass::getProduct, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see <a href="https://codex.ww.wp.xz.cn/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.0.) in www/wp-work-theme.loc/wp-includes/functions.php on line 4137Hi guys, I have a problem
woocommerce Notice: order_date was called incorrectly. Order properties should not be accessed directlyhelp me please !