Community Forums › Forums › Archived Forums › General Discussion › PHP Issues
Tagged: php error
- This topic has 2 replies, 3 voices, and was last updated 5 years, 11 months ago by
Deepakrathee.
-
AuthorPosts
-
April 2, 2019 at 3:03 pm #490439
hoolamonster
MemberHi, I cannot seem to locate the issue exactly. Maybe someone can help here. I've searched through some template files and I'm not seeing any issues.
Im displaying the woocom variable product info on category pages and this is the error that gets thrown.
Im on Monochrome 1, all plugins and genesis core files are up-to-date.
[02-Apr-2019 19:19:40 UTC] PHP 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('/plugins/genesis-connect-woocommerce/templates/taxonomy.php'), genesis, do_action('genesis_loop'), WP_Hook->do_action, WP_Hook->apply_filters, genesiswooc_product_taxonomy_loop, genesiswooc_content_product, 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, woocommerce_template_loop_add_to_cart, 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 /home/botron/public_html/wp-includes/functions.php on line 4161
[02-Apr-2019 19:19:40 UTC] PHP Notice: woocommerce_get_template is deprecated since version 3.0! Use wc_get_template instead. in /home/botron/public_html/wp-includes/functions.php on line 3853April 3, 2019 at 4:57 am #490445Victor Font
ModeratorThe error is in your code. The error message says "Product properties should not be accessed directly."
Since we can't see your code, all I can do is guess that you are accessing a product property incorrectly. Instead of calling the result of a method, you are trying to pull a variable directly, which isn't allowed.
It also appears that you are using the wrong function in your code:
PHP Notice: woocommerce_get_template is deprecated since version 3.0! Use wc_get_template instead. in /home/botron/public_html/wp-includes/functions.php on line 3853
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?April 10, 2019 at 2:00 am #490578Deepakrathee
MemberThe error is in your code. The error message says "Product properties should not be accessed directly."
Since we can't see your code, all I can do is guess that you are accessing a product property incorrectly. Instead of calling the result of a method, you are trying to pull a variable directly, which isn't allowed.
It also appears that you are using the wrong function in your code:
PHP Notice: woocommerce_get_template is deprecated since version 3.0! Use wc_get_template instead. in /home/botron/public_html/wp-includes/functions.php on line 3853Instagram Captions
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.